Repository navigation
Conversation
… rudimentary UI to test the LLM, refs #17 | time: 2h30m
… 15m Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t a more readable code, refs #17 | time: 4h30m
…d understandabilty, refs #17 | time: 1h30m
…me with the real model. There is one known error included that should be solved through the semantic search in the backend (last test case). And executed pnpm format , refs #17 | time: 1h30m
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Refs #17,#12
Summary
Adds intent recognition for the shop chat: a small in-browser LLM (Qwen 2.5 0.5B via WebLLM)
turns a chat message into a structured
ShopRequest, and a shopping agent executes it.Built an rudimentary UI(not finished) to test the llm and the agent!
How it works
src/agent/message-parser/)llm-parser.tsasks the model for aShopRequestJSON, validated withshopRequestSchema(Zod).llm-corrections.tsfixes the model output. That means what models get wrong: prices, quantity and gender, invented products ("number", "jacket")src/agent/shopping-agent.ts)intent:search,add_to_cart,remove_from_cartoroff_topic.src/agent/agent-util/(product search, option matching, replies) to do a action.ShopResponse, e.g. "Added 1 × T-Shirt to your cart", plus the shownoptions and the recognised request from the JSON from the parsing step (visible in the chat under "Recognised request").
Tests
pnpm test): parser corrections, agent behaviour and React client components.pnpm test:prompts, seedoc/testing.md): replays a full chatconversation in Chrome with the real model
Known issues
"I want a labtop …") is red on purpose: the model does not fix the typo"labtop" → "laptop". This should be handled by the semantic search in the backend.