microsoft / microsoft/KBLaM

Guidance for Integrating KBLaM with Food/Nutrition Knowledge Base

Open
#82 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
1.5k
Forks
125
Avg merge
22d 8m
Merged PRs (30d)
1

Description

Hello KBLaM team,

First of all, thank you for making this project open and accessible — it's a really exciting approach to structured knowledge injection.

I'ma student working on a domain-specific use case involving a large food and nutrition database, which includes thousands of entities covering products, nutritional values, food groups, and other attributes such as:

  • Macronutrients (e.g. ENERC, FAT, CHO, PROT)
  • Micronutrients (e.g. VITC, CA, FE)
  • Numeric values (e.g. 12.2 g sugar, 0.6 g saturated fat, 61.0 g carbohydrates)
  • Categorization tags (e.g. "cereal products", "vegetables")

Training Setup

I trained the model for 2,000 steps using the Meta-Llama-3-8B-Instruct model. The food database was transformed into the expected KBLaM format like this:

{"name": "White pepper", "property": "FOOD_GROUP", "value": "Seasoning"}
{"name": "White pepper", "property": "CA", "value": "265.0"}
{"name": "Beef soup", "property": "THIA", "value": "0.022"}
Observed Issues
  • Despite the training, I’m encountering several challenges:

  • Poor retrieval quality for health-related queries
    e.g. “Which foods are good for diabetics?” often retrieves items with high sugar or refined carbs.

  • Abbreviations like ENERC, FIBT, FASAT are not well understood
    (Note: I plan to map these to full names in the next training run.)

  • Generated outputs are incoherent, sometimes repeating the user's prompt or hallucinating answers.

  • Numeric values (e.g. 12.6g) appear particularly problematic for the model to use effectively.

Request for Guidance

Could you please advise on best practices for integrating a numeric-heavy, structured KB like this into KBLaM?

Specifically:

  • Handling Numeric Data: Any suggestions for how to better encode or structure numerical values so that the model can reason over them effectively?

  • Downstream Fine-Tuning: Should I augment the training with open-ended QA examples (e.g. “What foods are good for a Mediterranean diet?”)?

I understand that numerical information may be difficult for the current compression method, as noted in the paper, but any insights or advice would be greatly appreciated.

Thank you again for your great work and for your time!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are mentioned. Start by reviewing the KBLaM-format examples and the reported retrieval, numeric-value, and generation failures; a useful outcome would be maintainer guidance on encoding numeric data and whether QA augmentation is appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
machine-learning
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.