Comments (9)
Will do @timothepearce
This is (probably) the last feature I'll push before spending some time on important housekeeping (setting up CI, tests, better documentation, tutorials for training on a new language, etc...), but I'm hoping to have it out next week (in beta, just like everything else in RAGatouille at the moment 😄) !
from ragatouille.
Hey @hiranya911 @timothepearce, closing this issue as it's now available in 0.0.4a1 #31 🥳
from ragatouille.
What are the scores returned by the rerank() API? Are they logits (log probabilities) or some other scaled values?
This is a good question and could do with more explaining. It's non-normalised MaxSim scores, which is how ColBERT score documents: for each query token, compare cosine distance w/ all document tokens and keep the max score in memory, and the total score is the sum of all those individual scores. (a good, slightly longer explanation can be found here). This could be normalised to give a "relevance" estimate.
Are there any recommendations on the content length of documents passed into rerank()?
Anything up to your ColBERT's base model maximum length (for ColBERTv2, bert-base-uncased, so 512) is fine, but the longer the documents, the slower the process is. I think it's mostly about finding the sweet spot for you between doc length and efficiency constraints!
from ragatouille.
That would be so cool! I have some code for this, @bclavie, I can get it.
QQ for @hiranya911 , do you want the docs to be pre-encoded? Or supplied at query time?
from ragatouille.
The search
function in ColBERT accepts a pids
argument which can be used to rank only the given documents.
from ragatouille.
@okhat I think I want to pass the documents as raw text. Kind of similar to how the MsMarco cross encoder API is set up. But I'm sure passing the pre-encoded docs is valid use case too.
from ragatouille.
Hey @hiranya911, this is definitely something that I'll be adding to the roadmap (@okhat, please do share the code you have 😄), thanks for the suggestion!
from ragatouille.
@bclavie When you're done, ping me here, and I'll PR weaviate/reranker-transformers to add RAGatouille there!
from ragatouille.
This is working like a charm. Thanks for the quick turnaround 🙏
Couple of questions when you have a moment:
- What are the scores returned by the
rerank()
API? Are they logits (log probabilities) or some other scaled values? - Are there any recommendations on the content length of documents passed into
rerank()
?
from ragatouille.
Related Issues (20)
- Stuck at " Loading segmented_maxsim_cpp extension (set COLBERT_LOAD_TORCH_EXTENSION_VERBOSE=True for more info)..." HOT 1
- ImportError: cannot import name 'PromptTemplate' from 'llama_index' (unknown location)
- Compatibility with LangChain 0.2.0 HOT 3
- How to extract embeddings generated by Colbert? HOT 2
- Idea: Make CorpusProcessor (and splitter_fn / preprocessing_fn) to have access to metadata
- Embedding Model with Existing Index HOT 1
- How to index collection using generator function?
- Training script is not working as is
- Making deletions will alter the collection.json file, hence the search function unusable because we access the collection using list indices.
- can't access my finetuned model HOT 1
- Use base model or sentence transformer HOT 1
- ragatouille requires a version of numpy uncompatible with python
- ValueError: RAGatouille is not installed. Please install it with `pip install ragatouille`.
- Documentation (API Reference): missing params in description tables
- Question -- Symmetric search HOT 1
- How to use highly capable Decoder only models (LLMs) with RAGatouille -- is it even advisable? HOT 1
- RuntimeError when indexing with FAISS HOT 4
- RAGAtouille cpu only installation HOT 1
- Typescript support of RAGatouille HOT 1
- Question: rerank does not use index
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ragatouille.