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

[WIP] [feat](search): use elastic for lexical search #37

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ledoux
Copy link

@Ledoux Ledoux commented Oct 11, 2024

Contexte

Il faut aider nos utilisateurs de l'api albert à effectuer une recherche sur leurs documents à l'aide d'une approche elastic et sémantique.

Rendus

  • SearchClientEngineElastic => hybryd search implétation similaire à PyAlbert
  • VectorStore --> SearchClientEngineQdrant =>

Recherche sur internet en hybridsearch : dans une autre feature.
Interdire la collection internet si HybridSearch dans un premier temps.

@Ledoux Ledoux changed the base branch from main to dev October 11, 2024 09:52
@@ -10,6 +10,7 @@ class SearchRequest(BaseModel):
prompt: str
collections: List[Union[UUID, Literal[INTERNET_COLLECTION_ID]]]
k: int = Field(gt=0, description="Number of results to return")
method: Literal["vectors", "keywords", "hybrid"] = Field(default="semantic")
Copy link

@dtrckd dtrckd Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"semantic" is not defined in the method literal ?

I would use Literal["semantic", "lexical", "hybrid"] that seems to better reflect the choices to me.

  • semantic : dense vector based similarity (embedding)
  • lexical : sparse vector based similarity (bm25/tfidf)
  • hybrid : combine both (with reranker, like RRF)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ledoux Ledoux changed the title [WIP] [feat](search): use elastic for keywords search [WIP] [feat](search): use elastic for lexical search Oct 11, 2024
@leoguillaume leoguillaume changed the base branch from dev to main October 11, 2024 14:42
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

Successfully merging this pull request may close these issues.

2 participants