Your FDE portfolio should show where the agent breaks
An agent that is right 80% of the time gets three straight runs right only 51% of the time, so evals built from real failures beat a polished demo.
In brief
- One project done in depth, with a case study, beats many polished demos; choose a realistic business scenario with messy data.
- Keep the agent loop simple and readable, invest in tool descriptions and log every run from the start.
- Start the eval suite from real failures, use cheap assertions first, report pass^k and read transcripts to check the graders.
An agent that answers correctly on 80% of runs sounds respectable, until you work out the probability that it is right three times in a row: 0.8 × 0.8 × 0.8 = 51.2%.
That is why an FDE portfolio repo should go beyond a demo that runs well. A demo is a single attempt. A repo worth sending shows where the agent breaks, how often it breaks and how you dealt with each failure. The measurement approach here draws on what Anthropic, OpenAI and Hamel Husain advise for building evals for AI systems.
A guide on the blog of FDE Academy, a training provider, says plainly that one deployed project with a written case study carries more weight than eight polished demos.
This is advice, with no claim to being a law, but the reasoning is easy to follow: a system that works on real data demonstrates more skills than eight prototypes running on clean data.
Building such a repo takes five steps. The code below is a condensed sketch: the model call is left blank so you can plug in your own SDK.
Step 1: What makes a problem “enterprise” enough?
The same FDE Academy guide says to choose a realistic business scenario, build only the MVP instead of chasing the full vision, and use messy data that is real or realistic. That last condition separates an FDE portfolio from a course assignment.
Take a hypothetical distributor that receives supplier invoices by email. Some PDFs are scanned at an angle, some invoices say “VND” while others use the “đ” symbol for the Vietnamese dong, and some tax codes are missing digits. The MVP does one job: the agent reads the invoice, checks it against the purchase order, and returns “match”, “mismatch” with a reason, or “needs review”.
invoice-agent/
agent/loop.py # core loop
agent/tools.py # tools + descriptions
data/raw/ # messy invoices
logs/ # one JSONL file per run
evals/cases.jsonl # case set
evals/test_basic.py # pytest-style assertions
README.md
Check: you can state the MVP scope in one sentence. If that sentence uses “and” more than twice, cut something.
Step 2: Why must the core loop be readable in five minutes?
In “Building effective agents”, Anthropic recommends finding the simplest possible solution and adding complexity only when it is needed. It also warns that frameworks often add layers of abstraction that obscure the underlying prompts and responses. In a portfolio this is a serious flaw: a reviewer who opens the repo and cannot find the prompt cannot judge how you think.
# agent/loop.py — condensed sketch
def run(invoice_text, po, call_model, tools, log):
messages = [system_prompt(), user_msg(invoice_text, po)]
for step in range(8): # cap the number of steps
reply = call_model(messages, tools)
log.write(step, messages, reply) # record everything
if reply.tool_call is None:
return parse_verdict(reply)
result = tools[reply.tool_call.name](**reply.tool_call.args)
messages += [reply, tool_result(result)]
return {"verdict": "needs_review", "reason": "step limit reached"}
The tools deserve most of the effort. Anthropic calls this the agent-computer interface and advises designing it with care, with thorough tool documentation and testing. In this repo, each tool’s docstring should specify the input format, say when the result is empty and include an example.
def lookup_po(po_number: str) -> dict:
"""Look up a purchase order by its PO number.
po_number: 'PO-' + 6 digits, for example 'PO-004512'.
Returns {} if not found; do NOT guess a similar number."""
Check: give loop.py to someone who has never seen the repo. After five minutes of reading, they can explain what the agent does.
Step 3: Log before you write evals
OpenAI’s “Evaluation best practices” recommends logging everything during development, so the logs can later be mined for eval cases. In “Your AI Product Needs Evals”, Hamel Husain goes further and calls for removing all friction from looking at data. If reviewing one run means opening three files and endless scrolling, you will soon stop doing it.
The cheapest approach is to write one JSONL line per run, containing the input, each tool call and the final verdict. Then write a small script that prints each run to the terminal in a readable form.
Run the agent 20-30 times on data/raw/ and read every run. You will very likely meet failures you did not expect. One example is whether the agent reads “1.200.000”, where Vietnamese notation uses dots as thousands separators, as 1.2 million or as 1.2.
Check: you have a list of real failures that you recorded yourself, each with a path to its log file.
Step 4: Start evals from failures, not theory
Anthropic defines an eval concisely: give an AI system an input, then apply grading logic to its output to measure success. It says 20-50 simple tasks drawn from real failures make a good starting point. The failure list from step 3 is the raw material.
{"id": "c07", "invoice": "data/raw/inv_07.pdf", "po": "PO-004512", "expect": "mismatch", "must_mention": "quantity"}
Husain suggests that the first layer should be fast, cheap assertions, like those you already write in pytest. Leave whatever code can check to code, and ask a model to grade only what code cannot.
# evals/test_basic.py — sketch
@pytest.mark.parametrize("case", load_cases("evals/cases.jsonl"))
def test_verdict(case):
out = run_case(case)
assert out["verdict"] == case["expect"]
assert case["must_mention"] in out["reason"]
pytest evals/ -q
According to Anthropic, agent evals typically combine three types of grader: code-based, model-based and human. In a portfolio repo, the code layer needs to be solid. Add one model-based grader to judge whether the agent’s reasons make sense, and state clearly in the README which parts you graded by hand.
OpenAI calls this eval-driven development: evaluate early, evaluate often and write tests scoped to each stage.
The number to put at the top of the README is pass^k. Anthropic distinguishes pass@k from pass^k, which is the probability that all k attempts succeed. The opening calculation is pass^3 for an agent that is right 80% of the time, assuming the runs are independent: 51.2%.
Say an accounts clerk uses that agent three times a day. The chance that all three uses are correct is only a little over half, so the clerk will run into an error on roughly every second day.
Read the number with care if the case set is small. With 20 cases, one case changing its result moves pass^k by 5 percentage points, and the smaller k is, the more easily one lucky run can flatter the figures.
In practice, run each case at least three times, rerun the whole suite once more to see how much the number jumps, and always report the number of cases and the value of k beside the result.
The final part of evaluation is the one most often skipped. Anthropic stresses that you cannot know whether graders are working well without reading the transcripts and grades from many trials. Pick ten runs graded “pass” at random and read them again. A grader that is too lenient is more dangerous than a weak agent.
Check: pytest runs every case to completion, though not all of them have to pass. Because the cases come from real failures, some staying red is normal, and those form your next to-do list. The README should state how many cases pass out of the total, with a pass^3 table broken down by failure category.
Step 5: A README and video for people who won’t run the code
GitHub Docs lists the questions a README should answer, starting with what the project does. For an FDE repo, write the README as a short case study.
It should cover the invented customer’s problem, the MVP scope and what you deliberately left out, the eval results with pass^k, three remaining failures, and what you would do with two more weeks.
Take particular care over the remaining failures. They show readers that you can measure the limits of your own system and speak plainly about them.
Make the three-minute video for a manager rather than an engineer. One possible split: 30 seconds on the problem, 90 seconds running the agent on a messy invoice that is actually in data/raw/, 45 seconds opening the eval results and reading out the pass^k figure, and a final 15 seconds on one failure you have not fixed. Do not film yourself typing code.
Common mistakes
The most common mistake is choosing a heavy framework before knowing what you need, leaving the prompt buried under five layers of classes. The second is using clean, self-generated data, which turns the evals all green while proving nothing. The third is reporting only the best run instead of pass^k.
How does this carry over to customer work?
The five steps apply beyond a portfolio; your repo is the place to practice these habits first.
On your CV, avoid a vague “built AI agent”. Write one line with numbers, such as “built a suite of 40 eval cases from real failures, raising pass^3 from X to Y”, where X and Y come from your own repo. If a job description mentions “evaluation” or “reliability”, send the repo link with your application.
Let the repo answer in advance the question every customer eventually asks: where does the agent break, and how often?
Was this article useful?
Thanks for the feedback!
6 sources
- Building effective agents · 2024-12-19
- Demystifying evals for AI agents · 2026-01-09
- Your AI Product Needs Evals · 2024-03-29
- Evaluation best practices (OpenAI API docs)
- How to build a forward deployed engineer portfolio · 2026-09-19
- About READMEs - GitHub Docs