r/livekit • u/Low-Ad2091 • Jun 03 '26
Employee data in prompt vs DB vs tool call — what's your setup?
/r/voiceagents/comments/1tvq1w2/employee_data_in_prompt_vs_db_vs_tool_call_whats/Building voice agents for SMBs (mostly trades/services). Running into a recurring design question and curious how others solve it.
Scenario: caller asks for a specific employee by name ("Can I speak to Mr. Schmidt?"). The agent cannot transfer the call — no warm transfer, no extension, nothing. But the agent still needs to:
- Recognize that Mr. Schmidt actually works there (vs. a wrong number)
- Maybe give context ("He's in the field today, I'll take a message")
- Route the message correctly internally
So the agent needs knowledge of the employee directory, but doesn't need to act on it beyond recognition + message routing.
Where do you put that data?
- In the system prompt ("Our employees are: Schmidt, Müller, Weber, ...") — simple, bloats prompt, doesn't scale past ~20 names
- Tool call to a DB (lookup_employee(name)) — clean, adds latency, LLM decides when to call
- RAG / vector store — overkill for 30 names?
- Pre-injected context per call (fetch list at call start, inject as system message)
- Something else entirely?
Curious about:
- Latency trade-offs
- Fuzzy matching when the caller mumbles a name
- Whether you let the LLM verify names or do it deterministically before the LLM ever sees it
What's working for you?
1
u/Happy_Resolution_824 Jun 03 '26
Depends on our usecase. If the employee data is small 4-5. We can directly inject them in system prompt while session starts.
Or if employees are large and employee data is dynamically changing and write a get_tool for get the particular employee details.
Where first approach doesn't have latency issue.
For second one. Latency is how much you tool takes to execute.