Hello KNIME Community,
I am currently working on a project where I need to integrate a Large Language Model (LLM) within KNIME to facilitate search functionality for product titles and SKUs.
Objective:
The goal is to allow users to input a search term as a prompt, and the model should be able to retrieve the full product title and the corresponding SKU that matches the search term. The data I am working with is in the form of a DataFrame containing product titles and SKUs.
Questions:
- How can I implement an LLM in KNIME to process user prompts and match them with the product titles and SKUs?
- What nodes or extensions would be most effective for this task?
- Are there any examples or workflows available that I can refer to for similar implementations?
Any guidance or suggestions would be greatly appreciated. Thank you in advance for your help!
@Ali_Gad Welcome to the KNIME community. A few questions:
- How large is your product database?
- Do you want to implement some kind of fuzzy search or can you live with exact matches?
- Why do you want to use a LLM? Unless I’m missing something, it would seem that a lookup table would suffice.
Take a look at this:
A beginner’s guide to build your own LLM-based solutions | KNIME
Thank you for your response, rfeigel!
Regarding your questions:
- Product Database Size: Our product database contains nearly 30,000 products. It’s quite extensive, and I want to ensure accurate search results even when customers don’t provide an exact match.
- Fuzzy Search: Yes, I definitely need to implement fuzzy search. Customers might not always type the full product title correctly, so I want to handle variations and typos gracefully.
- Why LLM (Language Model)? While a lookup table could work for exact matches, I’m opting for a language model (LLM) for a few reasons:
- Adaptability: An LLM can learn from our dataset and adapt to new queries over time.
- Generative Answers: As you mentioned, I also want to use LLM for generative answers related to recipes and cooking. Customers might ask about cooking techniques, substitutions, or variations, and an LLM can handle those cases effectively.
I agree that a LLM model would probably be ideal. Obviously, developing one will be a complex task. Its certainly beyond my skill set. Maybe other KNIMERs can weigh in. In the meantime, take a look at the attached workflow. It certainly won’t handle generative answers but may be adequate for your table lookups. It may be inefficient for your large reference table. It does handle typos/misspellings pretty well (examples attached.) Finally, I have no idea how complex are your product descriptions.
1 Like
Hi Rfeigel,
I wanted to extend my sincere thanks for the great and much-appreciated help you’ve provided. The workflow you shared has been incredibly useful.
However, when I execute the workflow and open the component, I encounter the following error:
WARN Joiner 5:38:0:31 Errors loading flow variables into node: ConfigBase for key "leftTableJoinPredicate" not found.
This error causes the execution to fail. I’ve attached a screenshot for your reference.
Could you please advise on how to resolve this?
Thanks again for your assistance!
Are you simply running the workflow I sent or are you using a different reference table? If the latter, have you checked that the joins are correct? What version of KAP are you running? I’m on 5.3. Also, what’s your operating system?
Did you find the problem?