MaartenGr / MaartenGr/BERTopic

Representation model diversity parameter is not working

Open
#1,736 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

Hi Maarten,
Thanks for this great package.
I am using OpenAI as a representation model to get title and one line summary.

As I have many duplicates in my data. So I want to use a diversity parameter to select documents that are sufficiently diverse, but it's not working.
documents
It is effecting representation doc of topics
representative_doc
Also , Within my prompt I am using [DOCUMENTS], How can I check which documents are sent to LLM ?

`openai_model = OpenAI(
client = client,
model="gpt-3.5-turbo",
exponential_backoff=True,
prompt=prompt,
delay_in_seconds=2,
chat=True,
nr_docs=60,
doc_length=100,
diversity = 0.75,
tokenizer=tokenizer)
`

Contributor guide

Open the contributing guide

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

Start with the OpenAI representation configuration shown in the issue, then trace how nr_docs, doc_length, diversity, and [DOCUMENTS] are processed. Reproduce the duplicate-document behavior and verify which documents reach the LLM; done means diversity affects representative documents and the selected inputs can be inspected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.