0
Phase 19

AI Travel Planner

~3 min read

Concept & How It Works

    Why Does It Exist?

    Classic constraint-satisfaction + tool orchestration capstone. Proves you can coordinate APIs, maintain itinerary state, and handle user iteration.

    Real-World Analogy

    A travel agent juggling six browser tabs who remembers you hate 6am flights and need vegetarian restaurants.
    Loading diagram...

    Visual Workflows

    What is AI Travel Planner?

    Loading diagram...

    Example

    Scenario

    Tokyo April, $3K, vegetarian. Agent finds HND flights $680, hotel Shinjuku $900, schedules Fushimi Inari day with metro times, highlights vegan ramen spots, total $2,840 with booking URLs.

    Solution

    In Capstone Projects, apply AI Travel Planner to this scenario: Tokyo April, $3K, vegetarian. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

    Practice Task

    Do this before moving to the next module — reading alone is not enough.

    Open the Code Walkthrough below and run it locally. Change one parameter related to AI Travel Planner (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.

    Code Walkthrough

    Highlighted lines show where AI Travel Planner happens in the code.

    AI Travel Planner
    1# AI Travel Planner — minimal example2from openai import OpenAI3
    4client = OpenAI()  # create API client5
    6# Ask the model to explain this topic7response = client.chat.completions.create(  # core API call for AI Travel Planner8    model="gpt-4o-mini",9    messages=[10        {"role": "system", "content": "You explain ai travel planner clearly."},11        {"role": "user", "content": f"What is ai travel planner?"},12    ],13    temperature=0,14)15print(response.choices[0].message.content)  # show output for debugging

    Commands to Remember

    Commands to Remember

    • git checkout -b capstone/project-name # isolate capstone work
    • docker-compose up -d # run full stack locally

    Common Mistakes

    • Hallucinated confirmation numbers
    • Ignoring transit time between activities
    • No budget sum validation

    Cheat Sheet

    Quick recap — the most important points from this module.

    Cheat Sheet

    quick ref
    • Live prices + timestamp
    • Constraint satisfaction
    • Booking links not fake confirms