Detailed edition · project-to-portfolio workshop

Turn an AI/ML project into evidence employers trust.

A practical masterclass using a restaurant review assistant: from problem discovery and notebook workflow to a recruiter-ready GitHub repository, CV bullet, and interview story.

25 Aug 20262.5 hoursNotebook + website + GitHub
SK
Saurabh KangoEx-Meesho · Senior Manager, Business Analytics & AI
The promise

By the end, you can explain the entire system—not just run the cells.

01 · PROBLEM

Choose useful work

Translate a recurring business decision into an AI task with a clear user and outcome.

02 · BUILD

Design the workflow

Move from raw reviews to clean data, structured LLM output, evaluation, and responses.

03 · PROVE

Show evidence

Document inputs, outputs, failures, design trade-offs, and reproducible setup.

04 · POSITION

Tell the right story

Tailor the same project for analyst, product, GenAI, and ML-focused roles.

Session map

One project, seven layers of evidence

01

User pain

Managers cannot consistently read and answer every review.

OUTPUT · problem statement
02

Data

Review ID, customer name, rating, text, and timestamps.

OUTPUT · clean dataframe
03

AI workflow

Sentiment → aspects → evidence → response draft.

OUTPUT · valid JSON
04

Product loop

Export reviews, process them, approve and import replies.

OUTPUT · usable interface
05–07

Proof & story

Evaluation, GitHub documentation, CV bullet, interview narrative.

OUTPUT · credible portfolio
Recruiter lens

A skills list is a claim. A project is a chain of inspectable decisions.

Weak signal

“Python, NLP, prompt engineering, LLM APIs.”

The reviewer still cannot tell whether you solved a problem, handled failure, or shipped anything useful.

Strong signal

“Built a review-response workflow that converts unstructured feedback into aspect sentiment, evidence phrases, and manager-ready drafts; documented failure cases and a reproducible demo.”

  • What problem? Name the user, pain, frequency, and consequence.
  • What decisions? Explain your data contract, prompts, checks, and trade-offs.
  • What proof? Show the repo, one end-to-end example, evaluation, and limitations.
Problem discovery

Start with a repetitive judgment call, not a model.

1 · OBSERVE

What repeats?

A person repeatedly reads text, compares signals, makes a category decision, or drafts a similar response.

2 · BOUND

What is the smallest useful job?

Define one input, one output, one user, and one action. Avoid “build an AI platform.”

3 · MEASURE

How will you know it helped?

Accuracy, valid JSON rate, reviewer agreement, draft acceptance, or time saved per item.

PROJECT TEST

If you can finish this sentence, the project has a spine: “When [user] receives [input], the system helps them [decision/action], so [outcome].”

Real-world translation

Same workflow pattern, different industries

Context
Repetitive judgment
Portfolio project
E-commerce
Read return comments and identify root cause.
Classify defect, fit, delivery, or expectation mismatch; route to the right team.
Campus hiring
Read candidate feedback and identify friction.
Extract interview-stage themes, sentiment, and recommended process fixes.
Customer support
Read tickets, decide urgency, draft a reply.
Predict category and priority, cite evidence, generate a human-reviewable response.
Restaurant reviews
Identify what went well or badly and reply.
Aspect sentiment plus evidence phrases and manager response draft.

The domain changes. The reusable pattern is: unstructured input → structured judgment → evidence → action.

Case study

Restaurant review assistant: the business brief

CURRENT STATE

Manual and inconsistent

Reviews arrive throughout the week. A manager reads each, interprets food/service/ambience, then drafts a response when time allows. Tone and specificity vary.

TARGET STATE

Faster first draft, human-owned decision

The system analyses each review, surfaces the phrases behind each label, and drafts a reply. The manager reviews before publishing.

NOT IN SCOPE

No autonomous publishing

The model does not promise compensation, accuse staff, or publish without review. The workflow supports judgment; it does not remove accountability.

SUCCESS SIGNALS

Useful, measurable outputs

Valid JSON, correct aspect coverage, evidence grounded in the review, acceptable tone, and fewer minutes spent per draft.

LLM key terms · foundations

Four terms to understand before making the first model call

LLM

Large Language Model

A model trained on large amounts of text to predict the next token. That prediction ability lets it classify, extract, summarise and generate language—but it does not guarantee factual truth.

PROMPT

The task specification

The instructions and input sent to the model. A strong prompt defines the role, task, allowed labels, output format, constraints and the review text to analyse.

TOKEN

A unit of model input and output

Models process pieces of words rather than characters or full sentences. Input and generated output both consume tokens, which affects context limits, latency and API cost.

CONTEXT WINDOW

The model’s working space

The maximum tokens available for instructions, examples, review text and the response together. If the input is too large, important content must be selected, chunked or summarised.

LLM key terms · behaviour

Four terms that explain why model output needs control

INFERENCE

Using the trained model

The model is not being retrained when our notebook sends a review. It is performing inference: generating an answer from the supplied prompt and its learned parameters.

TEMPERATURE

Variation in generation

A lower setting usually makes outputs more consistent; a higher setting allows more variation. Classification and JSON extraction generally benefit from controlled, repeatable output.

HALLUCINATION

Plausible, unsupported content

The model may invent a detail that sounds reasonable. We reduce this risk by limiting the task, extracting evidence, validating fields and keeping a human in the approval loop.

STRUCTURED OUTPUT

A machine-readable contract

Instead of free-form prose, the model returns named JSON fields with allowed values. The application can parse, validate and route the result reliably.

API integration · why

Why the notebook calls the LLM through an API

OUR NOTEBOOK
Prompt + reviewPython packages the instructions and one review into a request.
API keyIdentifies and authorises the provider account making the call.
HTTPS request / responseA standard programmatic bridge to a hosted model.
MODEL PROVIDER
Hosted LLM inferenceThe provider runs the large model infrastructure; we do not host it on the laptop.
Returned text or JSONOur code receives, parses and validates the output before using it.

Programmatic

Many reviews can follow the same repeatable function instead of manual copy-and-paste.

Practical

We use a capable hosted model without downloading or operating large-model infrastructure.

Measurable

Calls can be logged, validated and evaluated for latency, token usage, cost and failures.

API integration · process

Connect the notebook securely, one responsibility at a time

01 · CREATE

Generate a key

Create a project key in the model provider’s console and set an appropriate usage limit.

WHY · account access
02 · STORE

Keep it secret

Save the key in a Colab secret or environment variable—not in a notebook cell.

WHY · prevent exposure
03 · LOAD

Read at runtime

Read the named environment variable only when the notebook runs, keeping code and credentials separate.

WHY · safe sharing
04 · CALL

Create the client

Choose the model, token limit and messages, then send one small test request.

WHY · verify the route
05 · CHECK

Validate the reply

Parse JSON, check required fields and log failures before processing every row.

WHY · reliable pipeline
SECURITY RULE

The key proves who is paying and who is allowed to call the service. Never commit it to GitHub, print it in output, or place it in browser-side code. If exposed, revoke it and create a new one.

Notebook workflow · overview

The full notebook, from file input to website-ready output

INPUT & PREPARATION
reviews_export.jsonOr the notebook’s clearly labelled demo reviews.
DataFrame constructionreview_id · name · review
Quality checksCharacter, word and sentence counts.
Text cleaningUnicode, URLs, HTML, whitespace and punctuation.
Iterative prompt contractEach stage adds one production requirement.
AI & DELIVERY
Task 1–2Zero-shot sentiment → structured JSON.
Task 3–4Aspect labels → supporting evidence.
Task 5Analysis → constrained manager draft.
manager_responses.jsonImported into the website for review.
Notebook workflow · setup

Cells 1–6: establish one controlled route to the model

INSTALL

anthropic + pandas

Keep dependencies minimal and name versions in your repository so another person can reproduce the environment.

CLIENT

Create one model client

Use an environment variable or Colab secret for the API key. Never commit a key to GitHub.

WRAPPER

One ask_claude() function

Centralise model name, token limit, message format and return handling. Every later task uses the same call path.

safe_setup.py
import os, anthropic

client = anthropic.Anthropic(
    api_key=os.environ["ANTHROPIC_API_KEY"]
)
MODEL = "your-supported-model"

def ask_claude(prompt: str) -> str:
    message = client.messages.create(
        model=MODEL,
        max_tokens=1024,
        messages=[{"role": "user",
                   "content": prompt}]
    )
    return message.content[0].text.strip()
Notebook workflow · ingest

Cells 7–10: make the data source explicit and traceable

CHECK

Look for export

Test whether /content/reviews_export.json exists.

IF YES · load file
VALIDATE

Read required fields

Extract review_id, review text and optional name.

FAIL LOUDLY · bad shape
FALLBACK

Use labelled demo data

The sample keeps the notebook runnable, but must never look like user history.

LOG · source used
FRAME

Build the dataframe

One row per review; stable ID becomes the join key for import.

SCHEMA · id/name/review
WHY THE ID MATTERS

review_id is the contract across website export, notebook processing, and website import. Without it, a response can attach to the wrong review.

Notebook workflow · prepare

Cells 11–14: inspect first, clean second, preserve meaning

Profile length

Character, word and sentence counts catch empty, very short, or unusually long inputs.

Normalise carefully

Handle Unicode, HTML, URLs and repeated whitespace before sending text to the model.

Keep an original column

Store review_original and review_clean. Evidence should remain auditable against the original text.

Do not over-clean

Punctuation, negation and emojis may carry sentiment. Remove only what damages the task.

RISKY

Lowercase and strip everything, then overwrite the only copy of the review. “Not bad!” can lose a useful emphasis signal.

BETTER

Keep the original, create a cleaned field, document each transformation, and compare outputs on a small set before scaling.

Prompt stage 1

Zero-shot sentiment: prove the core judgment on one review

task1_prompt
You are analyzing restaurant reviews.
Classify the sentiment of the review below as one of:
- Positive
- Negative
- Neutral

Review:
{review}
WHAT THIS TESTS

Can the model make the basic classification without examples?

RUN SMALL FIRST

Use one representative review

Print the exact input and raw output. Read both before applying the function to all rows.

LIMITATION

Correct is not yet usable

A natural-language explanation cannot reliably populate a dataframe column. Stage 1 proves capability, not integration.

Prompt stage 2

Structured output: turn a chat reply into a data contract

“The food was delicious, but we waited forty minutes for a table.”INPUT REVIEW
Required output{"sentiment":"Neutral"}
Allowed labelsPositive · Negative · Neutral
ParserJSON object only
Failure handlingEmpty object + logged raw text
  • Specify the schema. Name every field and accepted value.
  • Ban extra text. A pipeline needs predictable output, not prose around the answer.
  • Still validate. Prompt instructions reduce errors; they do not replace parsing and schema checks.
Prompt stage 3

Aspect sentiment: preserve mixed feedback instead of flattening it

“The dosa was crisp and the sambar was hot, but the waiter ignored us and the dining room was noisy.”ONE REVIEW · THREE EXPERIENCES
OverallNeutral
Food QualityPositive
ServiceNegative
AmbienceNegative
PRODUCT DECISION

Add Not Applicable for unmentioned aspects. Forcing every review into every category creates false claims and weakens trust.

Prompt stage 4

Evidence extraction: make every label reviewable

LABEL ONLY

Service: Negative

Useful for a dashboard, but impossible for a manager to verify quickly.

LABEL + EVIDENCE

Service: Negative

Features: “waiter ignored us”, “waited forty minutes”. Now the label is traceable to the source text.

expected fragment
"Service": {
  "sentiment": "Negative",
  "features": [
    "waiter ignored us",
    "waited forty minutes"
  ]
}

Require short phrases and empty lists for unmentioned aspects. Check that extracted phrases are grounded in the review.

Prompt stage 5

Generation with guardrails: analysis becomes a manager-ready draft

ACKNOWLEDGE

Be specific

Reference the experience the customer described—cold food, long wait, friendly staff—not generic “feedback.”

RESPOND

Match the situation

For negative feedback: apologise for the specific issue and state one credible action. For positive: thank and reinforce what worked.

CONSTRAIN

Avoid risky promises

Maximum three sentences. No compensation, policy commitment, invented investigation, or autonomous publishing.

HUMAN-IN-THE-LOOP

The output is a draft. A manager owns the final wording and publication. This is both a product design decision and a responsible-AI control.

Production detail · parsing

The unglamorous layer that makes the demo reliable

parse_json_response
def parse_json_response(text):
    if not text:
        return {}
    try:
        text = remove_code_fences(text)
        payload = extract_first_json_object(text)
        result = json.loads(payload)
        validate_schema(result)
        return result
    except Exception as error:
        log_failure(text, error)
        return {}
Preserve raw output

When parsing fails, keep what the model actually returned. Otherwise debugging becomes guesswork.

Validate allowed labels

A syntactically valid JSON object can still contain “Mostly Positive,” which breaks the contract.

Track failure rate

Report valid JSON percentage and schema-valid percentage separately.

Retry narrowly

If you add retries, retry parse/schema failures with a correction prompt—not every response blindly.

Evaluation plan

“It looked good” is not an evaluation.

FORMAT

Valid JSON rate

How many calls parse successfully and contain every required field?

LABELS

Human agreement

On a labelled sample, how often do model and reviewer agree by aspect?

GROUNDING

Evidence fidelity

Are feature phrases present in, or faithful to, the source review?

USEFULNESS

Draft acceptance

Would a manager approve, lightly edit, heavily edit, or reject the response?

STARTING TEST SET

Create 20–30 reviews covering positive, negative, neutral, mixed, sarcasm, one-aspect-only, very short, multilingual, and policy-sensitive cases. Report the composition; do not hide the hard examples.

Failure analysis

Three realistic edge cases—and what you do about them

SARCASM

“Loved waiting an hour.”

Risk: literal positive classification.
Response: include sarcasm examples in evaluation; route low-confidence or contradiction cases for manual review.

MIXED LANGUAGE

“Food mast tha, service slow.”

Risk: language coverage is undocumented.
Response: state supported languages, add representative Hinglish tests, or detect and route unsupported inputs.

UNSAFE PROMISE

“Refund me today.”

Risk: draft promises compensation or action beyond authority.
Response: prohibit compensation commitments and require manager review.

End-to-end product loop

Website → notebook → manager review → website

01 · EXPORT

Download reviews

The site produces reviews_export.json with stable review IDs.

OWNER · website
02 · PROCESS

Run notebook

Load, clean, classify, extract evidence, draft responses, validate.

OWNER · analyst
03 · REVIEW

Inspect drafts

Manager checks tone, factual grounding, and operational promises.

OWNER · human
04 · IMPORT

Publish approved replies

Import manager_responses.json; IDs attach each response correctly.

OWNER · website

For a portfolio demo, file exchange keeps the architecture visible and explainable. In production, an API, queue, access controls, monitoring, and audit logs would replace the manual hand-off.

Data contract

The two JSON files are the handshake between systems

reviews_export.json
[
  {
    "review_id": 1042,
    "name": "Guest",
    "review": "Food was excellent…"
  }
]
manager_responses.json
[
  {
    "review_id": 1042,
    "Overall": "Positive",
    "Food Quality": "Positive",
    "Service": "Not Applicable",
    "Ambience": "Not Applicable",
    "manager_response": "Thank you…"
  }
]
INTERVIEW-WORTHY DETAIL

Explain how you would validate unique IDs, reject unknown IDs, handle duplicate imports, and preserve the manager’s edited response.

GitHub · repository anatomy

Make the repo understandable before anyone opens the notebook

review-response-assistant/
├── README.md ← start here
├── notebooks/
│  └── review_pipeline.ipynb
├── src/
│  ├── prompts.py
│  ├── parsing.py
│  └── pipeline.py
├── data/
│  ├── sample_reviews.json
│  └── expected_output.json
├── tests/
│  └── test_parser.py
├── docs/
│  ├── architecture.png
│  └── demo.gif
├── requirements.txt
├── .env.example
└── LICENSE
Notebook teaches the journey

Keep the exploratory narrative, sample calls, and visible outputs.

src/ proves engineering discipline

Move reusable prompts, parsing and pipeline logic out of copy-pasted cells.

Sample data makes review possible

Use non-sensitive, clearly labelled examples with an expected output.

Tests protect the fragile layer

At minimum, test code-fence stripping, malformed JSON, missing fields and invalid labels.

GitHub · README section 1

Open with the problem, user, and outcome—not the technology list

AVOID

“This project uses Python, pandas, Anthropic API, NLP and prompt engineering for sentiment analysis.”

WRITE THIS KIND OF OPENING

“Restaurant managers often reply to reviews late or inconsistently. This project turns each review into aspect-level sentiment, supporting evidence, and a manager-reviewable response draft.”

WHO

User

Restaurant manager reviewing customer feedback.

WHAT

Job

Understand issues and prepare a specific response faster.

WHY

Outcome

Consistent, evidence-grounded drafts with human approval.

GitHub · README section 2

Show the architecture and explain every arrow

SOURCE

Website export

Why JSON? What fields are required? How are IDs generated?

TRANSFORM

Notebook pipeline

What is cleaned? What remains unchanged? What is sent to the model?

INFERENCE

LLM contract

What labels and schema are allowed? What happens when parsing fails?

DELIVERY

Reviewed import

Who approves the draft? How is the response matched to a review?

  • Under the diagram, write 4–6 sentences. A diagram without an explanation is decoration.
  • Name the boundary. “This demo uses file exchange; production would need an authenticated API and logging.”
GitHub · README section 3

Give a reviewer a 5-minute reproducible path

Clone and create environment

Show exact shell commands and supported Python version.

Install dependencies

Pin the main library versions in requirements.txt.

Configure secrets

Provide .env.example; never include a real API key or committed notebook output containing one.

Run sample mode

One command or notebook sequence should work with labelled sample reviews.

Run with website export

Explain the filename, location, schema and generated output file.

Quick start
git clone <repo-url>
cd review-response-assistant
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# add your own key locally
jupyter notebook
GitHub · README section 4

Show one complete input → decision → output example

“The biryani was aromatic, but delivery took 70 minutes and the food arrived cold.”INPUT · anonymised sample
OverallNegative
Food QualityMixed · “aromatic” / “arrived cold”
ServiceNegative · “delivery took 70 minutes”
Draft actionAcknowledge delay and temperature; manager reviews
  • Use a sample you are allowed to publish. Remove personal details and label synthetic or demo data honestly.
  • Show the raw JSON. The screenshot proves appearance; the payload proves the contract.
  • Add a short demo GIF. Keep the README useful even if the live demo is unavailable.
GitHub · README section 5

Publish evaluation, failure cases, and limitations

EVALUATION TABLE

Report what you tested

Dataset size, label mix, language mix, valid JSON rate, aspect agreement, and draft acceptance method.

FAILURE GALLERY

Show where it breaks

Include 3–5 examples: sarcasm, mixed language, implicit complaints, irrelevant text, and unsafe requests.

NEXT ITERATION

Tie fixes to evidence

Examples, schema validation, language routing, human review, monitoring, and cost/latency trade-offs.

TRUST SIGNAL

A limitation is not an admission of failure. It shows that you tested beyond the happy path and understand the boundary of your solution.

GitHub · final polish

Design the reviewer’s click path

0–20 SEC

Understand

Problem statement, one-line outcome, architecture image.

20–60 SEC

Believe

Input/output example, demo GIF, clear repo structure.

1–3 MIN

Inspect

Notebook, prompts, parser, tests, evaluation table.

3–5 MIN

Reproduce

Quick start, sample data, dependency file, secret setup.

Repository description

Use the problem and outcome in one sentence. Add precise topics—not every buzzword.

Pinned repository

Pin the project to your profile and use the same name on your CV.

Release snapshot

Tag a stable version so interviewers see the version you prepared to discuss.

CV positioning

Write the bullet as evidence: action + system + scope + result

CLAIM

“Worked on sentiment analysis using LLMs and Python.”

EVIDENCE

“Built a Python + LLM workflow that converts restaurant reviews into sentiment across three aspects, supporting evidence phrases, and manager-reviewable response drafts; added schema validation and a website JSON export/import loop.”

ACTION

Built

Use an ownership verb.

SYSTEM

End-to-end workflow

Name the moving parts.

SCOPE

3 aspects + drafts

Give concrete boundaries.

RESULT

Measured proof

Add only a metric you actually evaluated.

Role tailoring

The same repo tells a different story for each role

Target role
Lead with
Be ready to explain
Business / Data Analyst
Structured unstructured feedback; surfaced themes and aspect-level sentiment.
Data quality, category design, analysis choices, and business use.
GenAI / LLM Engineer
Prompt contracts, parsing, validation, grounding and failure handling.
Why JSON failed, how retries work, and how you would monitor drift.
ML / Applied AI
Evaluation set, class coverage, error analysis and baseline comparison.
Metrics, annotation method, failure segments, and model trade-offs.
Product / Analytics
User workflow, human review, success signal and phased architecture.
Scope decisions, adoption risk, safeguards, and next iteration.
Interview walkthrough

Answer “walk me through your project” in six moves

01 · CONTEXT

The user and pain

Restaurant managers reply late and inconsistently.

02 · SCOPE

The smallest useful job

Analyse three aspects and draft—not publish—a response.

03 · DESIGN

The data flow

Export → clean → prompt → validate → review → import.

04 · HARD PART

A real trade-off

Structured output and grounding mattered more than a clever prompt.

05 · EVIDENCE

How you tested it

Format validity, aspect agreement, evidence fidelity, draft review.

06 · NEXT

What you would improve

Language support, schema enforcement, API workflow and monitoring.

Seven-day build plan

Move from idea to a defensible portfolio project

Day 1 · Find the decision

Interview one user or observe one repetitive task. Write the problem sentence.

Day 2 · Define schema and sample

Create 10–20 permitted examples, labels, and the expected JSON contract.

Day 3 · Prototype prompts

Start with one input; add structure, aspects, evidence, then generation.

Day 4 · Build validation

Parse, validate, log raw failures, and create edge-case tests.

Day 5 · Wrap the workflow

Create a small interface or a clear file-based hand-off another person can use.

Day 6 · Evaluate

Measure, inspect disagreements, and document limitations.

Day 7 · Package

README, demo, pinned repo, CV bullet, and a two-minute interview walkthrough.

Final checklist

A strong project is not “AI used.” It is a decision made visible.

Can I name the user?

Not “businesses”—a person with a repeated job and a consequence.

Can I trace the output?

From original input through prompt, schema, evidence, validation, and review.

Can someone inspect it?

Clear repo, working sample, honest evaluation, limitations, and setup steps.

Build something small enough to own completely—and document it deeply enough that another person can trust your decisions.

Open floor

Questions?

Pick one part to discuss: problem framing, notebook flow, prompt design, evaluation, GitHub structure, CV positioning, or interview storytelling.

SK
Saurabh KangoEx-Meesho · Senior Manager, Business Analytics & AI