How I validate cited answers in an ASP.NET Core 8 assistant
Description and use
<p>I built a small ASP.NET Core 8 assistant around three synthetic cooking lessons. I wanted to make its answer path easy to inspect. Before asking a model anything, my application selects a passage. Before accepting a generated answer, it checks the source identifiers against that passage.</p> <p>The sample has a deterministic mode and an optional OpenAI-compatible chat adapter. The deterministic mode returns the selected lesson directly. The HTTP adapter can generate wording, but its response must pass a citation check.</p> <p>This distinction matters. I can verify that a citation names the
Problem
<p>I built a small ASP.NET Core 8 assistant around three synthetic cooking lessons. I wanted to make its answer path easy to inspect. Before asking a model anything, my application selects a passage. Before accepting a generated answer, it checks the source identifiers against that passage.</p> <p>The sample has a deterministic mode and an optional OpenAI-compatible chat adapter. The deterministic mode returns the selected lesson directly. The HTTP adapter can generate wording, but its response must pass a citation check.</p> <p>This distinction matters. I can verify that a citation names the
Outcome
<p>I built a small ASP.NET Core 8 assistant around three synthetic cooking lessons. I wanted to make its answer path easy to inspect. Before asking a model anything, my application selects a passage. Before accepting a generated answer, it checks the source identifiers against that passage.</p> <p>The sample has a deterministic mode and an optional OpenAI-compatible chat adapter. The deterministic mode returns the selected lesson directly. The HTTP adapter can generate wording, but its response must pass a citation check.</p> <p>This distinction matters. I can verify that a citation names the
Evidence
How I validate cited answers in an ASP.NET Core 8 assistant
- Record date: 2026-11-01T05:28:55.865Z