Is there anyone who has used both Marvin and Langchain to build QA application? How would you compar...
k
Is there anyone who has used both Marvin and Langchain to build QA application? How would you compare the experience and would you potentially use both?
n
hi @Kimmo Hintikka way back in late 2022, the first version of marvin was built on langchain, but we quickly decided we wanted more control, we weren't sure we wanted to use their abstractions personally, i don't find myself wanting to use langchain these days, but I will sometimes look there for help solving some specific problem that their massive and active community has engaged with over time (like intelligent text splitting for example) I'd be curious what you're up to / what you're considering these tools for
if you're a prefect user and interested in doing "chat your data" / Question Answering / RAG stuff, you might find this useful
the experience in using the tools I would say is very different langchain seems to try and cover as much surface area as far as new RAG techniques as possible, I'm not so sure nowadays what their core abstractions are, but last I knew you had documents loaders that let you get
SomeVectorstore.from_text
and then you run some retrieval chain against it? I think marvin doesn't do RAG like that directly, as in, we're not trying to write wrappers around a bunch of tools like llama index / pinecone etc. we mostly just integrate closely with pydantic and openai. and we're more concerned with building tools that allow you to easily use an LLM to go from: "arbitrary input format" (e.g.
str
, image, audio) -> native python/pydantic type, which we see as just "functional" prompt engineering, where you can use the outputs in normal code instead of making all your code about "ai stuff" here are some examples you find interesting: • use vision to process an insurance claimcreate a multi-modal summary of a github repo's daily activity • the implementation for the slackbot that runs every day (that OpenAI is working) in #C04DZJC94DC
k
I've now played with LangChain a bit and this another Django vs Flask discussion. Langchain does a lot but has lot steeper learning curve.
n
maybe so! we built marvin partly out of frustration with the abstraction sprawl in langchain, and we don’t try to cover nearly as much, as i mentioned we’re quite different tools. what are you main use cases? is it mainly “question answering”?
k
Right now its just QA from mix of technical docs (easy) and much less structured use case and security docs. I'm heading for a week on sking next week and plan to start building week after. I'm building something that answers pre-sales questions fast to people who don't know the answers. Later I plan to expand this to Chrome addon to fill in RFI/RFP docs and similar but LLM side functionality and source remains the same. I likely need to create way to read questions from Google/Excel sheets and procurement SaaS tool HTML pages and create templates if that is the word to make model understand they are questions as often RFIs are not formated as questions. RFI might simply say "encyption standards" and model need to derive that person wants to know which encryption is used and if it covers both data streams and data at rest for example. I will also need to control the type of answer expected but might do this in chrome addon itself. RFI level its often binary yes/no while RFP usually expects explanation but not always. Equally importantly it should be controlled not to hallucinate but always tell its not sure if not sure. This one is true to all my usecases
n
cool! I've been working on projects that sound somewhat similar for the year plus so I think it's possible you'll find my first and last links above useful since I'm essentially • scraping -> chunking -> embedding html from whole sitemaps at a time into either Chroma / Turbopuffer (my favorite vectorstore solutions at this point) - this is also where we annotate the documents with metadata so the eventual assistant can cite references • if you want, you can step in and manipulate documents you're generating based on some condition, like if some LLM thinks it looks like a question - but in my experience this isn't worth the squeeze and dumping everything in the vectorstore and letting it do its job is the move • giving an Assistant a vectorstore query tool and letting it be a custom conversational interface to this knowledgebase