One tool call per question: how to route spreadsheet QA across chat files vs knowledge base
Jason-Ping · reddit · 2026-10-16
A developer building a chat agent with two tools—analyzespreadsheet (pandas code over chat attachments, with a layout map to skip title/totals rows) and searchknowledge (RAG over shared org files)—faces a design problem: spreadsheets are becoming persistent knowledge, and questions about them need code execution, not passage search. Constraints: one tool call per question, the UI card must say "knowledge base", and RAG behavior must stay unchanged. He weighs three options: (A) a new analyzeknowledgespreadsheet tool with an inner agent that gets layout, runs code up to 3 times and returns figures—his pick, plus use/don't-use description lines and a 20-prompt routing test; (B) a mode on searchknowledge—rejected since search and code execution are different jobs and substring matching could hit the wrong file; (C) a knowledge source on analyzespreadsheet—rejected because fetching layout either bloats the prompt or breaks the one-call constraint. He asks whether a fourth approach exists and how others handle same-capability, different-source tool routing.
More from coding & agent
- Engineers Should Mine Gong Calls for Ideas That Never Became Tickets — curious_vii · 2026-10-16
- One 80-Word Prompt, Overnight AI Agent Built a Site With 205 Bakeries Mapped — jamesbrooksco · 2026-10-16
- Visual Lean: drag-and-drop GUI for the Natural Numbers Game runs Lean 4 in WASM — MilesCranmer · 2026-10-16
- Fine-Tuned 0.6B Router Beats Its 27B Sibling: Small Specialized Models Win — mshubham · 2026-10-16
- Engineering Leader: AI Got Me Coding Again — I Built Our Feature-Flag System With an Agent — rseroter · 2026-10-16
- Dev has lead agent update t3 code profile so threads survive rate limits — NERDDISCO · 2026-10-16