KeyLLM parameter control
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 385
- PR merge metrics
- No merged PRs in 30d
Description
I am using KeyLLM for a keyword extraction tool. I have already implemented the extraction tool with KeyBERT now since LLM seems to be a cool approach i would like to switch it to KeyLLM.
But the parameters of KeyLLm seems to be too controlled. For example we had many parameters like stopwords, diversity, topN etc in keyBERT which gave us a great control over the keywords we can get but KeyLLM lack trthese parameters.
but even if we mention it in prompt the the attempt seems to fail in many ways.
import openai
from keybert.llm import OpenAI
from keybert import KeyLLM
# Create your LLM
openai.api_key = "sk-............."
prompt = """
I have the following document:
[DOCUMENT]
Display 10 terms that best describe the document. Extract terms only from document.
Avoid the keywords in following list:
RESIN, Grant Agreement
"""
[['Climate Resilient Cities', 'Infrastructures', 'Fact Sheet', 'RESIN', '']]
Which seems to be doing nothing the prompt mentions.
Can you suggest me some edits?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the KeyLLM and keybert.llm.OpenAI usage shown in the issue, then compare it with the KeyBERT parameters named: stopwords, diversity, and topN. Clarify which controls should be supported and how prompt-based exclusions and term counts should behave; done means the requested controls are defined and the example produces the documented result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100