Solution Architecture¶
In this workshop, you will create the Contoso Sales Agent: a conversational agent designed to answer questions about sales data, generate charts, and download data files for further analysis.
Components of the Agent App¶
-
Microsoft Azure services
This agent is built on Microsoft Azure services.
-
Generative AI model: The underlying LLM powering this app is the Azure OpenAI gpt-4o LLM.
-
Vector Store: We will provide the agent with product information as a PDF file to support its queries. The agent will use the "basic agent setup" of the Azure AI Agent Service file search tool to find relevant portions of the document with vector search and provide them to the agent as context.
-
Control Plane: The app and its architectural components are managed and monitored using the Azure AI Foundry portal, accessible via the browser.
-
-
Software Development Kit (SDK)
The app is built in Python using the Azure AI Agents Service SDK. This SDK makes use of the Code Interpreter and Function Calling features of the Azure AI Agents service.
-
Database
The app is informed by the Contoso Sales Database, a SQLite database containing 40,000 rows of synthetic data. At startup, the agent app reads the sales database schema, product categories, product types, and reporting years, then incorporates this metadata into the Azure AI Agent Service’s instruction context.
Extending the Workshop Solution¶
The workshop solution is highly adaptable to various scenarios, such as customer support, by modifying the database and tailoring the Azure AI Agent Service instructions to suit specific use cases. It is intentionally designed to be interface-agnostic, allowing you to focus on the core functionality of the AI Agent Service and apply the foundational concepts to build your own conversational agent.
Best Practices Demonstrated in the App¶
The app also demonstrates some best practices for efficiency and user experience.
-
Asynchronous APIs: In the workshop sample, both the Azure AI Agent Service and SQLite use asynchronous APIs, optimizing resource efficiency and scalability. This design choice becomes especially advantageous when deploying the application with asynchronous web frameworks like FastAPI, Chainlit, or Streamlit.
-
Token Streaming: Token streaming is implemented to improve user experience by reducing perceived response times for the LLM-powered agent app.