[PR #5] [CLOSED] Refactor: Delegate Calorie Estimation to LLM & Strengthen Sorting Descriptions #4

Closed
opened 2026-02-27 15:56:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rersozlu/food402/pull/5
Author: @Canowar1
Created: 2/2/2026
Status: Closed

Base: masterHead: master


📄 Description

Summary
Removed static calorie database, nutrition estimation is now fully delegated to the LLM
Enhanced get_restaurants and search_restaurants tool descriptions with expanded Turkish/English keyword mappings and multi-criteria sorting instructions

Changes

  • Calorie Estimation (LLM-only)
  • Deleted shared/calorie-data.ts — static database, keyword matching, category fallback and generic fallback removed
  • shared/api.ts → estimateCalories() now simply returns the item list with an LLM instruction
  • shared/types.ts → Removed CalorieEstimate and CalorieEstimateResponse interfaces
  • src/index.ts → Tool description instructs the LLM to estimate calorie ranges, macros, and portion info
  • Sorting Improvements (additive only)
    -- get_restaurants → Added Turkish keyword mapping: "ucuz", "uygun fiyatlı", "yakınımdaki", "popüler", "çabuk", "acil"
    --search_restaurants → Added multi-criteria sorting support (e.g. "en ucuz ve en yakın"), top 5 presentation rule, closed restaurants pushed to bottom, product price vs minBasketPrice distinction

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rersozlu/food402/pull/5 **Author:** [@Canowar1](https://github.com/Canowar1) **Created:** 2/2/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📄 Description **Summary** Removed static calorie database, nutrition estimation is now fully delegated to the LLM Enhanced get_restaurants and search_restaurants tool descriptions with expanded Turkish/English keyword mappings and multi-criteria sorting instructions **Changes** - Calorie Estimation (LLM-only) - Deleted shared/calorie-data.ts — static database, keyword matching, category fallback and generic fallback removed - shared/api.ts → estimateCalories() now simply returns the item list with an LLM instruction - shared/types.ts → Removed CalorieEstimate and CalorieEstimateResponse interfaces - src/index.ts → Tool description instructs the LLM to estimate calorie ranges, macros, and portion info - Sorting Improvements (additive only) -- get_restaurants → Added Turkish keyword mapping: "ucuz", "uygun fiyatlı", "yakınımdaki", "popüler", "çabuk", "acil" --search_restaurants → Added multi-criteria sorting support (e.g. "en ucuz ve en yakın"), top 5 presentation rule, closed restaurants pushed to bottom, product price vs minBasketPrice distinction --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:56:47 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/food402#4
No description provided.