case study 05 / 05 · copilot studio · prototype

Standards assistant

Grounded answers from technical standards, with chapter and page

A prototype assistant that answers German-speaking site inspectors' questions from four technical guidelines and names document, chapter and printed page for every source. No product delivers chapter and page on its own, so I built a chapter index from the guidelines' own tables of contents and a citation topic that uses it.

Copilot StudioRAGSharePointDataversePower FxPythonPowerShell
356PDF pages in 4 technical guidelines
448rows in the self-built chapter index
421 of 421table-of-contents entries found in the text
5solution routes compared
Role
development, as a working student at S01 Projektmanagement GmbH: options paper, index builder, agent build and tests
Users
German-speaking site inspectors (planned)
Platform
a Copilot Studio agent in the company's Microsoft 365, with Teams planned as the channel
Status
prototype, tested in the Copilot Studio test pane, not published
01 / why it exists

Inspectors had four PDFs and no way to question them

On site, inspectors meet questions that have to be checked against technical guidelines: four PDFs with 356 pages in all, and no way to ask them anything. The task came from the supervisor, with one hard rule: every answer must name the document, the chapter and the page, and must not invent anything.

No product does that out of the box. Copilot Studio links to a page only on one upload path, and not on every citation. Microsoft 365 Copilot cites whole documents. Azure OpenAI “On Your Data” has no page field and was due to retire on 14 October 2026. The chapter and page layer therefore had to be built separately.

Two more things make it hard. “Page” is ambiguous: the printed page number, the PDF page and the page that Copilot's link counts can all differ. And the guidelines refer to many external standards that they do not contain, so “not contained in the documents” has to be a proper answer.

Who uses it

Planned: the German-speaking site inspectors. Today: only the developer, in the Copilot Studio test pane.

What it costs to run

An estimate, not an invoice: about 30 EUR a month pay-as-you-go, and nothing beyond licences if the inspectors already hold Microsoft 365 Copilot.

02 / how it works

How a question turns into an answer with chapter and page

Architecture diagram: Standards assistant An inspector asks a question in the chat. The assistant agent searches the standards library and drafts an answer. The citation topic catches the draft and asks the chapter lookup, which queries the chapter index, for the chapter of every cited page. The answer goes back to the chat with a list of sources. The index builder fills the chapter index once per document. TEAMS Inspector chat planned channel; test pane today COPILOT STUDIO Assistant agent answers only from its documents SHAREPOINT · DATAVERSE Standards library four PDFs, indexed for search POWER FX Citation topic catches the draft, rebuilds the sources SHAREPOINT CONNECTOR Chapter lookup one query, one row back SHAREPOINT LIST Chapter index 448 rows, locations only, no text PYTHON · POWERSHELL Index builder reads each table of contents and footer ONCE PER DOCUMENT TEST PANE Architecture diagram: Standards assistant An inspector asks a question in the chat. The assistant agent searches the standards library and drafts an answer. The citation topic catches the draft and asks the chapter lookup, which queries the chapter index, for the chapter of every cited page. The answer goes back to the chat with a list of sources. The index builder fills the chapter index once per document. TEAMS Inspector chat planned channel; test pane today COPILOT STUDIO Assistant agent answers only from its documents SHAREPOINT · DATAVERSE Standards library four PDFs, indexed for search POWER FX Citation topic catches the draft, rebuilds the sources SHAREPOINT CONNECTOR Chapter lookup one query, one row back SHAREPOINT LIST Chapter index 448 rows, locations only, no text PYTHON · POWERSHELL Index builder reads each table of contents and footer ONCE PER DOCUMENT TEST PANE
  1. 1Build the index ONCE PER DOCUMENTThe builder takes the chapters from each document's table of contents and the printed page numbers from the footers, then writes the index rows.
  2. 2Ask TEST PANEThe inspector asks a question in German, in the chat.
  3. 3Search the standardsThe agent drafts an answer only from the passages it finds. If nothing fits, it says that the content is not in the documents.
  4. 4Catch the draftBefore the answer goes out, the citation topic reads the file name and the page of every cited source.
  5. 5Find the chapterThe lookup asks the index for the deepest chapter with body text on that page, and one row comes back.
  6. 6Send the cited answerThe answer goes out with a “Sources” footer: document, chapter, printed page and a link that opens the PDF.
03 / data model

Six objects that link a PDF page to its chapter

Data model: Standards assistant A guideline document has many PDF pages and many chapters. A chapter has one or more index rows, and an index row covers a range of pages. At run time an answer has zero or more citations; each citation names one document and is matched to one index row. Guideline document four PDF files PK Document code Title Version File name PDF page derived, one per page PK PDF page number FK Document Printed page number Current chapter Chapter from the table of contents PK Chapter number FK Document Title Level, 1 to 4 Heading only Index row 448 rows, no text PK Citation text FK File name FK Chapter and part Printed pages Link pages Citation at run time only FK File name Link with page Snippet Answer at run time only Answer text Sources footer Number of citations
  • Guideline document library

    four PDF files

    • PKDocument code
    • Title
    • Version
    • File name
    • 1 document → many PDF pages
    • 1 document → many chapters
    • 1 document → many citations, matched by file name
  • PDF page object

    derived, one per page

    • PKPDF page number
    • FKDocument
    • Printed page number
    • Current chapter
  • Chapter object

    from the table of contents

    • PKChapter number
    • FKDocument
    • Title
    • Level, 1 to 4
    • Heading only
    • 1 chapter → one or more index rows (long chapters are split at table or figure captions)
  • Index row list

    448 rows, no text

    • PKCitation text
    • FKFile name
    • FKChapter and part
    • Printed pages
    • Link pages
    • 1 index row → a range of pages, stored as range columns instead of a join table
    • 1 index row → many citations, matched when the answer is made (no stored key)
  • Citation object

    at run time only

    • FKFile name
    • Link with page
    • Snippet
  • Answer object

    at run time only

    • Answer text
    • Sources footer
    • Number of citations
    • 1 answer → zero or more citations

Simplified: 6 of 8 entities. Left out: the test questions and an earlier design's section files. Pages and chapters are derived from the PDFs; citations and answers exist only at run time. A citation is matched to its document and its index row when the answer is made, so no key is stored for that link. Dashed border: document library or file store.

Three page numbers per row

Each index row carries the printed page (what the inspector reads), the PDF page and the link page (how Copilot counts). They can all differ: in an invented example, printed page 41 is PDF page 43 and link page 40.

Heading-only chapters are skipped

188 chapters consist of a heading with no body text. The lookup skips them, and they become the “not contained” test questions.

Locations, never the standards' text

The index stores where something is, never what it says. The text stays in the PDFs, so nothing from the standards is copied into the list.

04 / decisions

Trade-offs that shaped the build

Pilot on Copilot Studio

It is the fastest Microsoft route, it links to pages and it keeps the data in Germany. Azure AI Foundry stays an optional stage 2, and the Claude API an alternative only if processing in the USA is cleared. Trade-off: page markers are not guaranteed on every citation, and the agent is planned to live in Teams, not inside the QS Baustelle app.

A chapter index from each document's own table of contents

Chapters and printed page numbers come from the table of contents, and every entry that is not found in the text is reported (0 of 421). Trade-off: one build step per new document, and the documents need a table of contents.

The PDFs as the only knowledge source, locations in a lean list

Chapter and printed page are looked up in a lean list that holds locations only. The PDFs stay the single source of text, and the page link stays the native one. Trade-off: a separate link-page range is needed, and every inspector needs read access to the list.

Answer only from the documents

Ungrounded answers, general knowledge and the web are switched off, a custom fallback says “not contained in the documents”, and “not contained” test questions check it. Trade-off: clarifying questions are suppressed, and only one negative test has a recorded result.

Side topic: an invoice-archiving flow repaired

Separate from the assistant, documented in August 2026. An existing Power Automate flow renamed receipts from their metadata and moved them to an archive, and kept failing after about 25 minutes. The cause was a single supplier value that contains a slash, which SharePoint reads as a folder separator. The fix cleans every name part, skips folders, reports skipped files and keeps the runs sequential. Tested on real documents; notes for the move to production are written, and a proposed audit log is still an open request.

05 / my part

What I did

  • Wrote the options paper after a structured research pass: five routes (Copilot Studio, Microsoft 365 Copilot with a SharePoint agent, Azure AI Foundry, the Claude API and AI Builder) rated against the supervisor's requirements, licences, cost, effort and risk, plus a staged plan, eight decisions for the company and an acceptance test.
  • Built the index builder in Python and the import in PowerShell, fixed the import when 48 links exceeded SharePoint's 255-character limit, and had a sample of 32 rows of the first build checked against the rendered PDF pages.
  • Built and configured the agent: grounded-only settings, fallback message, starter prompts, knowledge folder, lookup tool and citation topic.
  • Found that Copilot's page links skip near-empty pages, and added link-page ranges to the index.
  • Wrote the build guide, the instructions and the acceptance set (4 positive, 10 negative and 3 photo questions).
  • Tested the agent with the four case questions the supervisor set, against the chapters the supervisor expected.
06 / result

A prototype, built in September 2026

Tested only in the Copilot Studio test pane; not published and not shared with inspectors. The options paper is dated 16 September 2026 and the agent was built between 17 and 21 September. On 21 September the supervisor's four case questions were answered with the expected chapter and printed page (4 of 4). The source footer appeared in 7 of 9 runs; the two misses went through a system topic that bypasses the citation topic, and that fix is open. Also open: publishing, a Teams and phone test, the photo questions and the remaining acceptance questions.