Marqo is an open-source vector search engine. Marqo allows you to store and query multi-modal data such as text and images. Marqo creates the vectors for you using a huge selection of open-source models, you can also provide your own fine-tuned models and Marqo will handle the loading and inference for you.You’ll need to install
langchain-community
with pip install -qU langchain-community
to use this integration
To run this notebook with our docker image please run the following commands first to get Marqo:
Additional features
One of the powerful features of Marqo as a vectorstore is that you can use indexes created externally. For example:-
If you had a database of image and text pairs from another application, you can simply just use it in langchain with the Marqo vectorstore. Note that bringing your own multimodal indexes will disable the
add_texts
method. -
If you had a database of text documents, you can bring it into the langchain framework and add more texts through
add_texts
.
page_content_builder
callback in the search methods.
Multimodal Example
Text only example
Weighted Queries
We also expose marqos weighted queries which are a powerful way to compose complex semantic searches.Question Answering with Sources
This section shows how to use Marqo as part of aRetrievalQAWithSourcesChain
. Marqo will perform the searches for information in the sources.