-
-
Save zilto/6acc2f4337e6b419d9a5b18447de6da1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = ( | |
weaviate_client.query.get( | |
"Chunk", # Class | |
[ # Properties to retrieve | |
"chunk_index", | |
"content", | |
"summary", | |
"fromDocument {... on Document {_additional{id}}}", # Property of linked object | |
], | |
) | |
.with_hybrid( # hybrid search parameters | |
query=rag_query, # user text query | |
properties=["content"], # properties of `Chunk` to search on (specified above) | |
vector=query_embedding, # user query embedding/vector | |
alpha=hybrid_search_alpha, # hybrid search parameter | |
) | |
.with_additional(["score"]) # compute relevance score | |
.with_limit(retrieve_top_k) # return top k objects | |
.do() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment