Skip to main content

Case 048

Source Citation

Severity / medium

Status / inspection open

Reviewer's docket / behavior before appearance

Your agent passed the prompt.Did it pass the path?

Agent Foundry follows the calls your code can actually reach, then grades each requirement against that trace.

1question
2retrieve
3context
4answer
citation metadata dropped

The documents carry source IDs. The final prompt never sees them.

Inspection criteria

  1. C1

    Cites sources for claims

    Every factual claim in the answer includes a reference to the source document

  2. C2

    Citations are accurate

    Citations match the actual source documents that contained the information

  3. C3

    Output remains readable

    The answer is still natural and easy to read despite including citations

Built by an Adobe MLE, ex-NVIDIA. Kaggle Master.
pip install mukh / 10k+ downloads

Specimen 048-A / one real submission

Read the code. Follow the wire. Mark the evidence.

PIPELINE / SIMULATE → GRADE
FRAMEWORK / LANGCHAIN
RESULT / ACTION REQUIRED

starter.pylines 15—25
  1. 15vectorstore = FAISS.from_documents(documents, embeddings)
  2. 16retriever = vectorstore.as_retriever()
  3. 17
  4. 18# BUG: The prompt does not ask the LLM to cite sources — answers have no attribution
  5. 19prompt = ChatPromptTemplate.from_messages([
  6. 20 ("system", "Answer the question based on the context below.\n\nContext: {context}"),
  7. 21 ("human", "{question}"),
  8. 22])
  9. 23
  10. 24def ask(question: str) -> str:
  11. 25 docs = retriever.invoke(question)
Signal path
01 / SIMULATETRACE02 / GRADE

Criteria are checked only against behavior visible in the simulated path.

Evidence ledgerRoot cause not fixed
  1. Cites sources for claims

    missing

    The final prompt receives content, but no source metadata.

  2. Citations are accurate

    blocked

    Accuracy cannot be checked because no citations are emitted.

  3. Output remains readable

    pass

    The generated answer remains natural and readable.

Inspect the full problem

Bench notes / read before operating

Questions left in the margin.

N01Who belongs at this bench?

Developers who can write Python and want to understand agent behavior beyond framework syntax. The roadmaps begin at fundamentals; the hard problems still make experienced engineers stop and trace.

N02What is free?

Every roadmap, problem, study plan, interview loop, and code example is free and open source under GPL-3.0.

N03Which frameworks are inspected?

CrewAI, LangChain, LangGraph, and the OpenAI Agents SDK. The same problem can be opened in multiple framework variants.

N04What does the reviewer send?

Your solution is simulated into a reachable execution trace, then checked criterion by criterion. The result identifies the evidence found, what is missing, and the next correction.

N05Where does the API key go?

You bring an OpenRouter key for AI review. It is stored in your browser and is not persisted by Agent Foundry.

Entry ticketAdmit one builder
048

First inspection

Source Citation

Difficulty
medium
Timebox
30 minutes suggested
Frameworks
LangChain / CrewAI / OpenAI Agents SDK
Open Problem 048