Semantic Layer course
Orchestration layer 45 min AccuracyConsistencyExplainability

The Q&A agent

The CRO asks again, and this time the answer comes with receipts

Section 1

Three ways to use what you just built

Next section
Section 2

Where the agent runs and what wraps it

Next section
Section 3

The nine steps, in order

Next section
Section 4

Tuesday, answered

Next section
Section 5

Daniel's application, and the decision the agent refuses to make

Next section
Section 6

The tools, the interfaces, and the other two agents

Next section
Section 7

Tracing ACE back to the components

Hands on

Wire the whole thing up

45 min

Run a local Q&A agent that classifies intent against the ontology, generates SPARQL, executes against Fuseki plus Ontop, runs the reasoner, retrieves a document citation, and returns the full answer plus evidence plus citations plus reasoning_steps JSON for the default question and for Daniel's application.

make lab-up            # once, starts Postgres + Fuseki + Ontop
make lab lab12-qa-agent

Full instructions, starter files and the solution are in labs/modules/lab12-qa-agent/README.md. The lab checks its own work, so you will know if it passed.

Check yourself

Quiz

7 questions, pass mark 70%. Answers are explained either way, so a wrong guess is not wasted.

1 Which two of the nine steps in the Q&A agent flow are always invoked? (pick two)

Select all that apply.

2 Why does the intent classifier ground entities in the ontology instead of passing them downstream as strings?
3 The guidance says query-time symbolic reasoning is often unnecessary. Why, and when do you still need it?
4 Daniel Okafor's application APP-9001 has credit score 640 and DTI 0.41. What does the agent conclude, and why?
5 The AWS guidance insists that every capability the internal Q&A agent uses must also be exposed to external agents, systems and users. What breaks if you skip that?
6 In the CRO's answer, the agent reports 1,203 defaulted loans but also mentions 1,847 and 4,102. Why report all three?
7 What does the act claim in the inbound JWT record, and why does the guidance want it?