Grounded Search Agents: Microsoft Foundry + Azure AI Search + Cosmos DB + Function Calling

TL;DR AI
2 min readKey summary
Microsoft Foundry, Azure AI Search, and Azure Cosmos DB are combined into a Python grounded search agent.
The agent uses Azure OpenAI function calling to choose between unstructured document search and structured database lookup.
Conversation state is stored in Cosmos DB, and every answer includes citations for verifiability.
The setup includes a hybrid search index with vector search and semantic ranking, plus document chunking, embedding, and ingestion.
