Skip to content

AIMI 106 · Module 3

Financial Media RAG Lab

Core question: can you build a small RAG assistant that compares two disclosure reports, cites every claim, abstains without evidence and beats a baseline on the same questions?

Start Section 1
0 / 6 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor

Info

After you join, your completed lesson numbers are sent to your instructor together with your learner code, so they can see your progress. Use the codes your instructor gave you or the email you sign in with, and do not enter your name, company secrets or other personal data. Progress is kept with the rest of that session's data.

Learning objectives

  • Build a controlled RAG prototype over two simulated disclosure reports, using a no-code or code track
  • Compare the risk statements of two reports with a citation for each side
  • Run an LLM-only or keyword-retrieval baseline on the same 10 questions
  • Score the results and keep a failure log with causes and fixes
  • Check your work against the rubric and critical fails, then submit artifact 106-A1

Controlled Build

12 min

A Controlled Build: No-Code or Code

Learning objective: build the smallest RAG prototype that can answer the evaluation set with citations. Both tracks are assessed with the same rubric, and no production vector database is required; a local index, a spreadsheet of chunks or a no-code document assistant your organisation has approved is enough.

Build steps
  1. Load only Report A and Report B, with your source register
  2. Chunk with your written rule and attach metadata
  3. Index with your chosen search method
  4. Set the answer rules: cite document and page/section, abstain without evidence, no investment advice
  5. Run the 10 questions and save every answer and retrieved passage

No-code track

  • An approved document assistant or workflow tool
  • Answer rules written as instructions
  • Retrieved passages copied into the evaluation sheet by hand

Code track

  • A short script with a local index
  • Answer rules in the prompt and in code checks
  • Retrieved chunks and scores logged automatically

Warning

Data rule: use only the simulated reports provided. Never upload confidential company information, client personal data or other restricted material to an AI service your organisation has not authorised. Doing so is a critical fail.
Check yourself

A learner wants to add an internal, unpublished research note to the knowledge base to "make answers richer", using a public AI service. What should happen?

A learner wants to add an internal, unpublished research note to the knowledge base to "make answers richer", using a public AI service. What should happen?

Key takeaway: Build small and controlled: two documents, written rules, saved outputs, and no restricted data in unauthorised tools.

Comparing Risk Statements

10 min

Comparing Risk Statements Across Two Reports

Learning objective: use multi-step retrieval to compare how Report A and Report B describe a risk, keeping each side cited and separating what the documents say from your interpretation.

Comparison template (fill from retrieved evidence only)
Risk topicReport A says (citation)Report B says (citation)Difference, or "not stated"
Topic you choseQuote or close paraphrase [report-a, section/page]Quote or close paraphrase [report-b, section/page]Describe the difference in the documents' own terms
Topic covered by one report onlyEvidence with citationNot stated in the loaded versionSay which report is silent; do not infer why
  • Retrieve each report separately (filter by document id), then compare
  • If one side has no evidence, write "not stated" rather than filling the gap
  • Avoid evaluative words such as "safer" or "better investment"; describe, do not recommend
  • An editor checks the comparison against both documents before it is used in any article
Check yourself

Report A describes its currency risk in detail; Report B never mentions currency risk. How should the comparison read?

Report A describes its currency risk in detail; Report B never mentions currency risk. How should the comparison read?

Key takeaway: Compare side by side with a citation for each side; "not stated" is a finding, not a gap to fill.

Baseline Comparison

10 min

Baseline: LLM-only or Keyword Retrieval

Learning objective: run a simple baseline on exactly the same 10 questions, so you can say what your RAG design adds and where it does not help.

LLM-only baseline

  • Same questions, no documents provided
  • Shows how often a model answers without evidence
  • Expect missing citations and missed abstentions

Keyword-retrieval baseline

  • Same documents, plain keyword search, no rewriting or agentic steps
  • Shows what simple search already achieves
  • Often strong on exact terms, weak on paraphrased questions

Info

Fair comparison: same questions, same expected evidence, same scoring rules, scored before you look at which system produced which answer where possible.
Check yourself

Which comparison is fair?

Which comparison is fair?

Key takeaway: A baseline on the same questions tells you what your design actually adds.

Scoring and the Failure Log

10 min

Scoring and the Failure Log

Learning objective: score every question with the four metrics and record each failure with its likely cause and a fix you tried or propose (106-CLO4).

Failure categories for the log
FailureTypical causePossible fix
Retrieval missChunk too small or too large; wording mismatchAdjust chunking; add hybrid search
Wrong documentNo document-id filterFilter by document id before search
Citation mismatchCitation attached to the wrong chunk or a merged passageCite from chunk metadata, not from generated text
Unsupported claimModel adds outlook or causes not in the passageTighten answer rules; require quote or close paraphrase
Missed abstentionNo rule for missing evidenceAdd an explicit abstain rule and test it
Over-abstentionRule too strict or retrieval too narrowRelax the rule; increase k; check chunking
  • Log each failure with: question id, system, what happened, category, likely cause, fix and whether the fix was re-tested
  • Keep failures you could not fix; an honest log scores better than a hidden one
  • Report counts per metric for both systems, with the small-sample limit stated
Check yourself

The assistant answers a no-answer question with a confident figure. Which failure category is this, and what is a sensible fix?

The assistant answers a no-answer question with a confident figure. Which failure category is this, and what is a sensible fix?

Key takeaway: Every failure gets a category, a cause and a fix; the failure log is evidence, not an admission.

Rubric and Critical Fails

8 min

Rubric and Critical Fails

Learning objective: know how artifact 106-A1 (Financial Media RAG Agent & Evaluation) is reviewed, so you can check your own work before submitting.

Rubric for 106-A1
CriterionWeightWhat reviewers look for
Knowledge architecture25Clear use case, traceable sources, a reproducible chunking and metadata design, a described retrieval flow
Retrieval quality25A baseline on the same questions and per-question results with hit@k
Answers and citations30Citations checked one by one, groundedness scored, at least two abstention tests
Risk and failure analysis20An honest failure log, data-rights and upload rules, prompt-injection awareness, a human review step

Warning

Critical fails (any one fails the artifact regardless of score): fabricating documents, sources or page numbers; treating information that was not retrieved as certain fact; uploading restricted data to an unauthorised service.
Check yourself

A submission has strong results, but one citation names a page that does not exist in Report B. What is the outcome?

A submission has strong results, but one citation names a page that does not exist in Report B. What is the outcome?

Key takeaway: Scores reward careful evaluation; critical fails protect readers from fabricated or unsupported claims.

Exercise: RAG Prototype & Evaluation

10 min

Exercise: RAG Prototype & Evaluation

Learning objective: complete and submit artifact 106-A1, the Financial Media RAG Agent & Evaluation for Formosa Finance Daily (simulated). Remember not to enter company secrets, client personal data or any unauthorised sensitive information.

  1. Run both systems
    Run your RAG prototype and your baseline on the same 10 questions and save every answer and retrieved passage.
  2. Check every citation
    Open each cited document and page or section and confirm it supports the claim.
  3. Score and log
    Score hit@k, citation accuracy, groundedness and abstention per question, and complete the failure log.
  4. Fill the template
    Complete the RAG evaluation template, including counts and the small-sample limit.
  5. Human review, then submit
    Have a partner review one comparison answer against both reports, then submit the 10 Canvas fields.

Done

Completing this lab counts as exercise 3 (aimi106-m3-rag-evaluation). Submitting the form records artifact 106-A1 for review.

Key takeaway: Course summary: a trusted media knowledge system is traceable, cited, willing to abstain, measured against a baseline and reviewed by a human before use.

What next?