Skip to content

Conversation

@KoderFPV
Copy link
Owner

Summary

  • Implement semantic product search using Weaviate vector search (text_vector)
  • Add LLM-based search query extraction from full conversation context
  • Create LLM-as-judge evaluation framework for e2e testing with Bielik model
  • Add translations for product search responses (English/Polish)

Changes

Product Search

  • searchProductIdsInWeaviate for semantic search via nearText on text_vector
  • productsNode extracts search query from entire conversation (not just last message)
  • Returns formatted product list with prices, categories, and stock status
  • Uses new getAgentTranslations helper for server-side translations

Evaluation Framework

  • evaluator.ts: LLM-as-judge using Bielik model (scores 1-5 with criteria)
  • conversationRunner.ts: Execute multi-turn conversations through chatGraph
  • productSearch.e2e.test.ts: 11 test scenarios
    • 5 single-turn product searches
    • 4 multi-turn conversations
    • 2 edge cases
  • Separate vitest config for e2e tests (npm run test:eval)

Test plan

  • Run npm test - unit tests pass (94 tests)
  • Run npm run test:eval - e2e evaluation tests execute (~16-18/21 pass, some variance due to LLM non-determinism)
  • Test product search in chat UI manually

🤖 Generated with Claude Code

- Implement semantic product search using Weaviate text_vector
- Add LLM-based search query extraction from conversation context
- Create LLM-as-judge evaluation framework for e2e testing
- Add translations for product search responses (en/pl)

Product Search:
- searchProductIdsInWeaviate for semantic search via nearText
- productsNode extracts query from full conversation, not just last message
- Returns formatted product list with prices, categories, stock status

Evaluation Framework:
- evaluator.ts: LLM-as-judge using Bielik model (score 1-5)
- conversationRunner.ts: Execute multi-turn conversations
- productSearch.e2e.test.ts: 11 scenarios (single-turn, multi-turn, edge cases)
- Separate vitest config for e2e tests (npm run test:eval)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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