Session

29 Tools, and Your Agent Picks the Wrong One

Your AI agent has 29 tools. On every call, all 29 descriptions get serialized into the context window, whether the user asks about weather or hotel bookings. That is thousands of wasted tokens per query, and the LLM still picks the wrong tool 15% of the time. Past 10 to 15 tools, the LLM struggles to choose from a crowded context, and every description inflates cost linearly with tool count. Semantic tool selection fixes both. Using FAISS and SentenceTransformers, you embed tool descriptions and search at query time to filter down to the relevant ones before they ever reach the LLM. I'll show three approaches, dynamic tool swapping while preserving memory, and a live comparison of all-tools versus semantic selection on identical queries. You'll walk away with: • A working semantic tool selection implementation with FAISS • A tool registry pattern with embeddings and metadata • Open source code for a 29-tool travel agent system with measured token and error rates


Outline: • The Dual Problem • Solution Architecture • Live Implementation • Production Pattern • Advanced Patterns

Elizabeth Fuentes Leone

Developer Advocate

San Francisco, California, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top