cicorias

Hyset POC — AI skill for Claude Code

AI community

Clean-room PoC of HySet (arXiv:2607.25718): set-level tool retrieval for LLM agents via query-conditioned hyperedge prediction.

How to install Hyset POC

This entry records only its repository, not the path inside it, so there is no exact command to give. Open cicorias/hyset-poc and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Hyset POC does

Clean-room PoC of HySet (arXiv:2607.25718): set-level tool retrieval for LLM agents via query-conditioned hyperedge prediction. PyTorch model + training, CLI, HTTP & MCP server, LangChain execution feedback (Claude/Ollama).

Alternatives in AI

  • PyTorch Lightning — Deep learning with PyTorch Lightning framework 6.4k ★
  • Jcodemunch MCP — Cut AI token costs 95%+ on code exploration 2.6k ★
  • Room — Open-source earning-focused swarm intelligence engine 838 ★

README

hyset — set-level tool retrieval for LLM agents

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](mise.toml) [![paper: arXiv:2607.25718](https://img.shields.io/badge/paper-arXiv%3A2607.25718-b31b1b.svg)](https://arxiv.org/abs/2607.25718)

A runnable, clean-room proof of concept of **HySet**, from *"Tools Are Not Islands: Set-Level Tool Retrieval for LLM Agents via Query-Conditioned Hyperedge Prediction"* (Hong, Dong, Yu, Jiang, [arXiv:2607.25718](https://arxiv.org/abs/2607.25718)).

Independent reimplementation. It is not affiliated with the paper's authors, and their code was not used (see [Clean room](#clean-room)).

An agent with thousands of tools can't put them all in its prompt, so a retriever picks a few first. Most retrievers score each tool on its own and take the top-k. A travel request then comes back with three flight APIs and no currency converter. HySet makes the **tool set** the unit of retrieval: it scores whole candidate sets (hyperedges of a tool co-invocation hypergraph) and hands the single best set to an unmodified agent.

What's in the box:

  • Method: the HySet model, its training loop (InfoNCE over pools of negative sets, plus reward-weighted self-training), and exact two-stage inference (shortlist, then score all 21,699 subsets).
  • Data: a synthetic tool world with planted set structure (decoy tools, implicit sub-tasks, cardinality-dependent co-invocation), plus a ToolBench converter.
  • Execution feedback: via LangChain, with Claude (default) or a local Ollama model as agent and judge over mock tools. An offline sim reward covers demos and CI.
  • Interfaces: a hyset CLI, an HTTP service (FastAPI), and an MCP server, so agents can call it as a pre-selection step.

How it works

Each tool `t` has a learned unit vector `z_t`, initialized from a frozen text encoder's embedding of its description. A candidate s