classifiers.build_tool_index module
Build the tool index used by the vector classifier.
Auto-discovers every registered tool via tool_loader, then
calls an LLM to generate 50 diverse synthetic user queries per tool
(reverse-HyDE). Results are saved to tool_index_data.json in
this directory.
Usage:
python -m classifiers.build_tool_index [--tools-dir tools]
- async classifiers.build_tool_index.generate_synthetic_queries(client, base_url, api_key, tool_name, tool_description, count=50, model='gemini-3.1-flash-lite-preview')[source]
Call the Gemini API directly to produce count synthetic queries.
Uses the shared flash-lite key pool for authentication. base_url and api_key are accepted for backward compatibility but ignored – all calls go through the Gemini API.