View a markdown version of this page

Step 3: Ask your first question - AWS Context

Step 3: Ask your first question

Ask the Agent Context a question in plain language. The console’s chat uses the same retrieval API that your agents call, so the answer here matches what an agent receives.

To ask a question

  1. On the agent-context-sample page, choose Chat with context.

  2. Select Details so that you can see how AWS Context builds the answer.

  3. In Ask a question, enter the following question, and then press Enter.

    How many orders are still pending, and what are they worth in total?

    After about 20 seconds, the answer appears: there are 423 pending orders, worth $727,580.50 in total.

  4. Review how AWS Context reached the answer:

    • The list of steps shows what it searched for, which tables it found, and the SQL that it ran against them.

    • Each number in the answer links to a source under Sources, such as the query result, a column, or a glossary term.

    • Trace details shows every event in order, with timings. To see the raw events, choose JSON.

Tip

Try other questions about the store, such as Which customer has placed the most orders? or How many customers have never placed an order? AWS Context includes 25 test questions with expected answers for the sample. You can run them as an evaluation from the Evaluation tab. For more information, see Evaluating context.

Next steps Keep the sample Agent Context, and continue with Tutorial: Explore the documents in the sample Agent Context.