
Conversational System
The conversational system integrates two structured data sources containing candidate information:
Both data sources use a structured tabular format and support querying via their respective query languages:
SharePoint
Uses CAML (Collaborative Application Markup Language)
PostgreSQL
Supports standard SQL
To enable natural language querying, the chatbot converts user queries into the appropriate query language based on the target data source. The retrieved data, along with the original question, is then passed to a large language model (LLM) to generate a context-aware response.
Since LLMs can occasionally generate incorrect queries, we've implemented a self-correcting loop that detects errors, refines the query based on the error feedback, and automatically retries until a valid response is obtained.
Text-to-SQL RAG Pattern
This setup follows a Text-to-SQL Retrieval-Augmented Generation (RAG) pattern (more info can be found at our pattern library), combining natural language understanding with structured data retrieval.
Since user queries may target either of the two data sources, we implemented a query router that intelligently determines the appropriate data source and routes the query accordingly to fetch the relevant information.
Typical chatbot systems respond with plain text, which can often be tedious to read—especially when dealing with long or complex responses. To make the experience more engaging and user-friendly, we developed a Generative UI system.
Our system dynamically adapts the user interface based on the user's query and the nature of the information. Rather than just answering, it responds in the most intuitive and visually appropriate format, making users feel understood.
Supported UI Components
Tables
For comparing multiple items side by side
Cards
For displaying individual items with rich content
Accordions
For organizing collapsible content sections
Tabs
For organizing content into separate, accessible sections
Markdown
Fallback format for general text content
Example Use Cases
Comparison Queries
When a user asks, "Compare the two candidates," the system renders a table to display information side by side for easy comparison.
Detailed Information
For queries like "Show me the work experience of John, Paul, and Ravi," the system uses accordions to present each candidate's experience separately, reducing clutter and allowing focused viewing.
Let's look at the workflow in detail

Future Research & Improvements
Enhanced PDF Integration
Embed PDF content directly within chatbot responses for a seamless user experience.
Advanced Agent Capabilities
Expand agentic capabilities to handle complex, multi-step queries with greater intelligence.