Project: 10Q Inference (CDK)
Last updated
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).
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
Completed the CDK Bridge module (your CDK project is initialized)
Working EDGAR API library from Project: SEC EDGAR API Library
Bedrock model access enabled per Setup: Bedrock Access
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.
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