Skip to content
Varad Khonde
← All work

Case study 03

Citation-backed RAG chatbot

Chat over SharePoint documents, by text or by voice.

Role
Backend engineer
Context
Client: a US national website
Stack
Azure AI SearchAzure OpenAIWebSocketsVapiAzure SpeechSharePoint

Hybrid

semantic, hybrid and keyword retrieval

Cited

answers link back to their source documents

Text + voice

real-time chat over WebSockets

Hybrid retrieval with citations, so every answer links back to the document it came from.

Key points

  • Ingestion. PDF and DOCX files in SharePoint are indexed automatically into Azure AI Search.
  • Retrieval. Semantic, hybrid and keyword search, with answers that cite their source documents.
  • Real-time chat. Text and speech over WebSockets, with bidirectional streaming and persistent sessions.
  • Voice stack. Azure Speech, the Azure OpenAI Realtime API and Vapi.

The full write-up behind each point follows below.

RAG chatbot architectureretrievegenerate · citeSharePointPDF · DOCXIngestion pipelineauto-indexes filesAzure AI Searchsemantic · hybrid · keywordUsertext or voiceWebSocket servicepersistent sessionsAzure OpenAIRealtime · Speech · Vapi
Ingestion keeps the index current; the WebSocket service retrieves, generates and streams back.

01

Ingesting SharePoint documents

PDF and DOCX files in SharePoint are picked up by an ingestion pipeline and indexed automatically into Azure AI Search, so new content becomes searchable without a manual step.

02

Retrieval with citations

The chatbot supports semantic, hybrid and keyword retrieval over the index and returns answers with citations pointing back to the source documents.

03

Real-time text and speech

Chat runs over WebSockets with bidirectional streaming and persistent sessions, for both text and speech. Speech is handled with Azure Speech services, the Azure OpenAI Realtime API and Vapi.