ProjectBuild an AI Voice Receptionist: the explanation · Module 16: Models, routing, fallbacks and prompts · part 18 of 23
Part 18 · Module 16: Models, routing, fallbacks and prompts
Module 16: Models, routing, fallbacks and prompts
25 min read·
About 40 minutes · Needs: Module 11 (the agent graph and its tools), Module 3 (infrastructure: why open models on Groq) · Code: backend/app/agent/router.py, backend/app/agent/llm.py, backend/app/agent/prompts.py, backend/app/services/prompt_service.py
Where this fits
This module (blue) covers how the agent picks one of three open models on Groq and which stored prompt version it answers with; admins edit prompts in the staff app, and versions live in PostgreSQL.
Module 11 showed the agent deciding what to do. This module covers what it leans on every turn: which model answers, and with which written instructions. Both change while calls run, so both need the care of code.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.