For the complete documentation index, see llms.txt. This page is also available as Markdown.

Project: 10Q Inference (CDK)

LLMs answer from their training data. When a student asks about a company's most recent quarterly filing, the model's training cutoff means it likely has not seen that disclosure. The answer it produces sounds confident but is often wrong — invented figures, conflated dates, or outright hallucinations.

This project teaches you to close that gap. You build a CDK-deployed Lambda that retrieves a real SEC 10-Q filing, injects it as context into the prompt, and returns an answer grounded in the actual document. By the end of this module you will have seen the failure mode first-hand (Part 1), fixed it with retrieval-augmented context (Part 2), extracted clean text from a filing (Part 3), and wired it all together behind the course Lambda contract (Part 4).

Module structure

Part
Focus

Invoke the model without context and observe its limitations

Provide filing text as context and compare the results

Extract and prepare filing text for the prompt

End-to-end Lambda conforming to the contract

Prerequisites

Deployment tool

Every part of this module uses AWS CDK (Python 3.12) for infrastructure deployment. If you have not yet initialized your CDK project, complete Project: CDK Init first.

Key references

  • Models — the canonical model identifier for all Bedrock calls

  • Lambda Contract — the request/response schema your Lambda must conform to


Last verified: 2026-06

Last updated