Back to the portfolio

Case study

An AI assistant with 30+ skills for business data and documents

An assistant built into an existing enterprise application. People ask in plain language, and it chooses from more than 30 skills. Document Research, covering more than 100,000 documents, is one of them. The rest retrieve different kinds of business data from the application's database. Every answer shows its evidence, and every skill respects the signed-in user's permissions.

Role
Software engineer & architect. Designed and built the system.
Client
An enterprise client, kept anonymous
Skills
More than 30, all permission-trimmed per user

The problem

Business information is spread across structured records, reports and meeting notes. One question can mean several screens, a search through documents and some careful reconciling of dates and terms.

The goal was a conversational assistant inside the application people already use. It had to be useful enough to save real research time and transparent enough to trust, which meant showing its sources and never revealing more than a user is permitted to see.

What it does

Users ask in ordinary language, the way they would in ChatGPT or Grok, and get a cited answer. Behind the chat sits a catalog of more than 30 skills. Document Research is one of them, and it works across more than 100,000 documents. The other skills each retrieve a different kind of business data from the application's database. The assistant picks the skill or sequence of skills that fits the question, and every one of them runs as the signed-in user, so results are trimmed to that person's permissions.

  • Document Research.Focused questions answered from relevant passages with page-level citations, and complete-set summaries that cover every matching document, such as all meeting notes in a date range, with coverage stated.
  • Business records and organizations.Exact counts, filtered and ordered lists, and oldest or newest results, with the creator shown when it is authorized and available.
  • Relationships and transactions.Lookups that resolve a named subject to a verified record and retrieve what is linked to it.
  • Reporting data.Structured reporting data, used together with the reports themselves to compare reporting periods with dates and units preserved.
  • Document inventory.Exact lists and counts of the documents that exist for a subject or period, which is also where complete-set summaries start.
  • Authorized user information.Lookups about application users, available only where the signed-in user is permitted to see them.

Skills can work together. A typical question resolves a name to a record, pulls structured data and then searches documents for the narrative behind it. A simple count needs no document research at all. Conversations are saved, follow-up questions keep their context, and users can add guidance while research is still running. A chat can be shared read-only with an authorized colleague, and ratings with comments help the team improve it.

Architecture

The assistant uses retrieval-augmented generation. For each question it selects the right skills, retrieves evidence from business records, documents or both, and hands that evidence to a language model. The application stays in control of every step.

Answering a question
  1. Signed-in userAsks in plain language inside the application
  2. Skill selectionPicks from 30+ skills in a versioned catalog, then arguments are validated
  3. EvidenceBusiness-data skills: typed, read-only lookupsDocument ResearchTrimmed to the user's permissions
  4. Language modelWrites a grounded answer from the selected evidence
  5. ValidationCitations and access are checked before the answer is saved
  • A versioned skill catalog.The more than 30 skills share one catalog. Each skill describes when to use it, what inputs it takes and how to read its results. The assistant chooses a skill, and the application checks the choice against a registered handler and a typed contract. Editing a description cannot create a new capability. Every run pins an immutable release, so each answer records the behavior version that produced it.
  • Typed, read-only database lookups.Every business-data skill calls an approved operation behind an allowlist, with filters, ordering, counts and top or bottom limits. The server binds each one to the signed-in user. There is no free-form SQL tool.
  • Citation and access validation.Before an answer is saved, the application checks its structure, its source references and the reader's current access. Reopening a saved answer checks again. If its support is gone or no longer authorized, the answer is withheld.
Document Research: keeping documents current, in the background
  1. Current documentsThe database decides which files belong
  2. SyncEligible files copied to a managed collection, originals untouched
  3. OCR and layoutReadable text with page references
  4. Passages and embeddingsOverlapping passages become vectors
  5. Azure AI SearchPublished with metadata for retrieval

The pipeline behind Document Research runs apart from any question. Per-document syncs and full reconciliations skip unchanged files and record durable checkpoints. A shared cache reuses OCR and embeddings for identical content, so identical content is not processed twice. Extraction problems show up as gaps in coverage, never as silent success.

Security by design

Access control has to survive the move into conversation, so it lives in application and database code, with prompt instructions as an extra layer. It applies to every skill, not only document search.

  • No direct data access for the model.It never holds a database connection or the ability to run arbitrary commands.
  • Identity from the server.The assistant needs an authenticated, eligible user with explicit permission. The server supplies that identity to every skill, and the model cannot pick another one.
  • A dedicated read-only identity.Lookups run through approved procedures. There is no business-data write path and no privileged fallback.
  • Untrusted input stays untrusted.Documents, messages and retrieved results are treated as untrusted, and the browser rebuilds approved formatting and validates links.
  • Deliberate sharing.Shared views are authenticated and read-only, with source checks for each viewer.

Quality and testing

Automated tests cover permissions, conversations, sharing boundaries, interrupted work, date handling, source validation and rendering, and CI regression gates run them. A separate evaluation catalog of 50 scenarios and 55 turns exercises real questions against a known release, including exact counts, full lists, historical comparisons, document inventories, follow-ups and requests the assistant should decline.

In a development environment, a complete-set summary accounted for every indexed document in a collection of more than 250. Coverage is reported as full, partial or missing. Those results show specific tested capabilities, not accuracy guarantees. Durable run state, duplicate-send protection and explicit retry controls cover the failure paths.

Stack

A C# application on .NET 10, with Azure SQL as the source of truth. Azure Blob Storage holds source and derived files, Azure AI Search holds passages and vectors, and Microsoft Foundry provides the language model and embedding deployments. Azure WebJobs run the background work and Azure DevOps handles delivery. I built it with AI coding agents, Cursor, Claude Code and Codex.

  • .NET 10
  • C#
  • Azure SQL
  • Azure Blob Storage
  • Azure AI Search
  • JavaScript
  • Azure DevOps
  • Azure WebJobs
  • Microsoft Foundry
  • OCR
  • Embeddings
  • RAG
  • Cursor
  • Claude Code
  • Codex