Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for Chunk Ranking in File Search #121

Open
aledc7 opened this issue Oct 17, 2024 · 0 comments
Open

Feature Request: Support for Chunk Ranking in File Search #121

aledc7 opened this issue Oct 17, 2024 · 0 comments

Comments

@aledc7
Copy link

aledc7 commented Oct 17, 2024

I'm requesting support for chunk ranking in the file search tool when using openai-php/laravel. Currently, the file search returns all results it deems relevant, but this can lead to lower-quality responses if the model uses content with low relevance. It would be useful to adjust this behavior by enabling chunk ranking configuration in the file_search tool to ensure only highly relevant chunks are used.

The expected functionality would allow:

Inspecting file search chunks: Using parameters like include to retrieve the specific file chunks used during a response generation run.

Configurable chunk ranking: Adjusting settings like:

ranker: Which ranker to use, e.g., auto or default_2024_08_21.
score_threshold: A value between 0.0 and 1.0, to filter file chunks based on their relevance score, improving the quality of responses.
For example, in the OpenAI API, you can inspect the file chunks during a run as follows:

run_step = client.beta.threads.runs.steps.retrieve(
    thread_id="thread_abc123",
    run_id="run_abc123",
    step_id="step_abc123",
    include=["step_details.tool_calls[*].file_search.results[*].content"]
)

This feature would significantly enhance the precision of responses generated from file searches. It would be great if this could be incorporated into future releases.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@aledc7 and others