Consultant Profile Search Assistant
Engineered an AutoGen retrieval agent that runs hybrid vector and semantic search over a CV library and returns JSON-mode structured output, rendered as interactive profile cards with blob-backed CV citations.
- Role
- Lead engineer · agent, retrieval & storage integration
- Year
- 2025
- Type
- Multi-agent
- Stack
- AutoGen AgentChat · Azure OpenAI · Azure AI Search · Python · FastAPI · WebSockets · React · TypeScript · Tailwind CSS · Azure Blob Storage
The problem
Staffing and bid teams at a professional-services firm built shortlists by hand-searching folders of long CVs or asking around, and keyword search across PDFs missed synonyms. They needed a fast shortlist with a reason for each person and the source CV at hand, with no invented candidate details.
Architecture
- 01
Query
A natural-language skills request goes over a FastAPI WebSocket to a session-scoped AutoGen agent.
- 02
Retrieve
The search_resume tool runs hybrid keyword + vector search with semantic reranking over an Azure AI Search CV index.
- 03
Enrich
Hits mapped to display names parsed from file-naming conventions, with CV links issued only when the blob exists.
- 04
Generate
Azure OpenAI in JSON mode returns a fixed {message, candidates[]} schema, steered by few-shot examples in the system prompt.
- 05
Render
React parses the JSON into a Tailwind carousel of profile cards with copy, email and drill-down actions.
- 06
Cite
CVs stream inline through a backend content proxy into an in-app PDF viewer, keeping storage credentials server-side.
Engineering highlights
01
Structured output to UI
Forced JSON mode plus few-shot examples give a machine-readable contract with distinct shapes for small talk, shortlists and single-candidate detail, which the front end renders as interactive cards instead of prose.
02
Grounded hybrid retrieval
The agent's only tool performs hybrid keyword + vector retrieval (text-embedding-3-small) with semantic reranking, and the prompt restricts answers to retrieved content so candidate details are never fabricated.
03
Credential-free citations
CV links resolve to the app's own content proxy, which verifies the blob exists and streams the PDF inline with the correct MIME type, so storage credentials never reach the browser.
04
Deterministic turn control
A single agent in a RoundRobinGroupChat terminates on its own first text reply, so every turn resolves its tool calls and returns control predictably; session history and agent state expire automatically.
05
Conversational card actions
Cards feed back into the agent loop: show details prompts a single-candidate view, while copy and pre-filled email actions share a profile summary together with its CV link.