Closed karlunho-datastax closed 7 months ago
There are multiple methods.
One method is reranking based on metadata - similar to Pinecone.
Rahul to do a spike based on the core dataset they are working on. Rahul to add more details.
I've been talking to Alejandro about what his team did at shopify. Simple things that can be done with re-ranking include looking at the articles that have lots of page views. Let's also take a look if there is some CQL query optimization opportunities as well.
LLAMAIndex has some built in reranking
For Cassandra / Cassandra Specific / SAI there are two use cases:
Explicit Declaration of Meta Data In this case the user defines a schema for the source data (from CQL table or other Array of Dictionaries/Objects) and this structure can be reflected upon to determine the metadata SAI indexes, alternatively, they can choose fields in the dictionary/object should be indexed as an override. In most search indexes that are Lucene based - each field can be specifically configured if not using the default settings.
Implicit Extraction of Meta Data In this case the user sends unstructured information, and we can imply a metadata schema either using LLM or explicitly define it. For example: keywords, entities, topics, etc. that can be extracted using LLM, and then filtered.
@xingh Take a look at Meta-Rank too - https://www.pinecone.io/learn/metarank/ We might just integrate with this product for now.
@karlunho-datastax
Pinecone's hybrid search is pretty good. Investigating Metarank, this is what I found:
ltr-bm25-meta-minilm-ce:
type: lambdamart
backend:
type: xgboost
iterations: 100
features:
- query_title_minilm_ft
- query_title_ce_ft
- query_title_bm25
- query_desc_bm25
- query_bullets_bm25
- category0
- category1
- category2
- color
- material
- price
- ratings
- stars
- template
- weight
When retrieving data via ANN from Cassandra, a light-weight re-ranking for the purposes of determining what vector search results to pass the the LLM is necessary.