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

Answer Engine Quality - Ideas #2657

Open
3 of 6 tasks
wsxiaoys opened this issue Jul 16, 2024 · 4 comments
Open
3 of 6 tasks

Answer Engine Quality - Ideas #2657

wsxiaoys opened this issue Jul 16, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@wsxiaoys
Copy link
Member

wsxiaoys commented Jul 16, 2024

Under Construction

The Answer Engine, released in version 0.13, provides a Q&A interface for Tabby's users to interact with the LLM, optionally within the context of a connected repository. The implementation is quite naive thus not really an performing one, we'd like to record ideas and improve the quality upon current baseline.

Prompt construction

Currently, the implementation is relatively simple. We collect snippets(instead of full article) from various sources and input them into a single LLM inference call to generate both the answer and the grounding (citation) information simultaneously.

  1. collect references: Query the index, which includes both code and documents, to gather chunks. Deduplication is carried out at the document level, making sure that from each document, only the chunk with the highest score is chosen.

  2. answer generation: Construct the prompt by combining the question and the content of each chunk to create a single LLM inference prompt.

  3. relevant questions: Generate relevant questions for the request, the prompt is also based on question and chunk

Ideas

Integrations

@wsxiaoys wsxiaoys added the enhancement New feature or request label Jul 16, 2024
@wsxiaoys wsxiaoys self-assigned this Jul 16, 2024
@wsxiaoys wsxiaoys pinned this issue Jul 22, 2024
@shinohara-rin
Copy link

I always though it's a good idea to not rely solely on embedding models for the retrival of relevant code.

In reality, human developers relies a lot on language servers, it would make sense to let LLMs make use of the language servers too (autocompletion, retriving def/refs, type inference, arguments hinting, docs, etc.)

For instance, extracting all symbols inside the user's selection and feeding the definitions and/or references to the LLM. This is of course a rather naive approach, but it should facilitate code understanding of the LLM.

@sananand007
Copy link

how exactly currently folks are testing out indexed data through a local repository that is indexed ? Are there any legit ways to do that ? Any apiCalls etc .. ?

@wsxiaoys
Copy link
Member Author

Hi! Please check https://demo.tabbyml.com/search/tabby-ml-tabby-how-to-add-new-implementation-of-h-zGLyqw for an example on how code context is affecting the answer engine's output

@imotai
Copy link

imotai commented Sep 21, 2024

Have you considered using a reranker model? @wsxiaoys

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

No branches or pull requests

4 participants