Skip to content

Fix memory-first travel recommendations#55

Open
markjbrown wants to merge 1 commit into
AzureCosmosDB:analyticsfrom
markjbrown:mjbrown/memory-first-recommendations
Open

Fix memory-first travel recommendations#55
markjbrown wants to merge 1 commit into
AzureCosmosDB:analyticsfrom
markjbrown:mjbrown/memory-first-recommendations

Conversation

@markjbrown
Copy link
Copy Markdown
Contributor

Summary

  • Fix Explore city startup so typed city IDs/display names work even when the city list is not loaded yet.
  • Avoid duplicate place filter requests when starting a trip from a selected city.
  • Add a backend fallback from themed semantic place search to simple filtered search when semantic search returns no results.
  • Speed up recommendations by routing obvious hotel/restaurant/activity requests directly from the Orchestrator to deterministic specialist nodes.
  • Preserve memory-first behavior by loading all active user memories, normalizing them through a reusable preference taxonomy, and ranking/filtering recommendations with explainable memory matches.
  • Skip expensive preference-extraction LLM calls for plain search/recommendation prompts without explicit new preferences.

Why

Recommendation requests were slow and could loop through Orchestrator/specialist ReAct tool calls. Some responses also claimed to check memories while not reliably applying important saved constraints such as dietary preferences. The new specialist path keeps the multi-agent handoff but makes the specialist execution deterministic: memory profile first, place retrieval second, formatted answer last.

Validation

  • python -m compileall -q python\src mcp_server
  • npm run build -- --configuration production --progress=false
  • ng test --watch=false --browsers=ChromeHeadless --progress=false (121 tests passed)
  • git diff --check
  • Live deployed checks before PR creation:
    • Restaurant recommendation in Amsterdam returned from Dining in ~1.7s with seafood/fish memory matches.
    • Hotel recommendation in Amsterdam returned from Hotel in ~1.1s with luxury/Michelin memory matches.

Improve Explore city handling, add themed place-search fallback, and make recommendation specialist nodes use deterministic memory-first retrieval with taxonomy-based preference alignment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@markjbrown markjbrown requested a review from aayush3011 May 13, 2026 08:36
@markjbrown
Copy link
Copy Markdown
Contributor Author

@aayush3011 I didn't change any of the lab files in this PR. I wanted you to review this first. It will definitely impact the lab and the text in those modules. I don't know if you have a way to handle this, agent, etc. but I wanted you to see this first.

@markjbrown
Copy link
Copy Markdown
Contributor Author

@aayush3011 PS this is on my analytics branch. Let me know if you want me to submit this on main. I can do that.

@TheovanKraay
Copy link
Copy Markdown
Contributor

@aayush3011 PS this is on my analytics branch. Let me know if you want me to submit this on main. I can do that.

Please do!

@markjbrown
Copy link
Copy Markdown
Contributor Author

Ok. I've had an agent analyze and cherry pick the fixes from the analytics branch. Then apply those to both the completed and exercises folder. I gave instructions on how to implement the changes that touched the learning content. It appeared to understand this and reflected that back to me. Here is the new PR: #56

once this is done, i'm going to pull that back into my branch so they are both aligned. I'm then going to do what I should have before, which is to create a new set of modules at the end of this workshop for this analytics work. once that is merged, i'll update the aka.ms link I've been using to the main branch.

Lastly, Theo and I had a discussion about this workshop. It may make sense to refactor this to focus on agent-led coding. worth a discussion at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants