Coder Social home page Coder Social logo

Comments (7)

bclavie avatar bclavie commented on July 19, 2024 1

Hey, this is a great suggestion and has already been requested!

It's doable without too many code changes because ColBERT natively supports querying only a subset of passage IDs. @anirudhdharmarajan can talk a bit more about this but right now we do have a mapping of document_ids to internal pids (passage_ids) at indexing time. This mapping could be used to make it so search() would only look within pids that are mapped to document_ids specified by the user, producing the behaviour you're requesting.

from ragatouille.

PrimoUomo89 avatar PrimoUomo89 commented on July 19, 2024

I had looked a bit at the pids when reviewing @anirudhdharmarajan 's pull request for document_metadata so a little familiar with what you're describing. I'll take a rough swing this week, but it's possible I'm out of my depth. Will look for feedback when I have a a plan.

from ragatouille.

PrimoUomo89 avatar PrimoUomo89 commented on July 19, 2024

Deleted my previous comments because it had the wrong approach. Will send a pull request later today hopefully.

from ragatouille.

PrimoUomo89 avatar PrimoUomo89 commented on July 19, 2024

Pull Request complete.

from ragatouille.

hehuan2363 avatar hehuan2363 commented on July 19, 2024

Are you refering to something similar to this issue in Colbert: stanford-futuredata/ColBERT#304

from ragatouille.

PrimoUomo89 avatar PrimoUomo89 commented on July 19, 2024

@hehuan2363
The main difference between what I implemented for this issue and what they're discussing on that issue, is that instead of implementing access to the filter lamda function, I instead implemented access to submitting document_ids (which are resolved to pids before search). I'm not sure what the best implementation would be on this side, but I imagine a lamda function which resolves document_ids in RAGatouille, which would then resolve the pids to search. If someone asks for it, I'll help out with that.

from ragatouille.

bclavie avatar bclavie commented on July 19, 2024

Pull

Thank you! Closing this issue as it's been merged

from ragatouille.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.