Skip to main content

Vector Store

Use Clarifai and LangChain to create a vector store and perform searches


Clarifai offers a powerful, built-in vector database within its AI platform. It is designed to store and retrieve large amounts of unstructured data quickly and accurately.

The Clarifai platform uses an embedding model to automatically index any piece of data uploaded to it. It creates high-dimensional vectors that are kept in the vector store, from where you can efficiently search for and retrieve data based on these vectors.

Let’s illustrate how you can use Clarifai and LangChain to retrieve text data based on their content and semantic similarity.

Prerequisites

  • Python development environment
  • Get a PAT (Personal Access Token) from the Clarifai’s portal under the Settings/Security section
  • Get your Clarifai’s user ID
  • Get the ID of the text app where the text data will be uploaded. Ensure your text app has the appropriate base workflow for indexing your text documents, such as the Language-Understanding workflow
  • Install the Clarifai Python SDK by running pip install clarifai
  • Install LangChain by running pip install langchain
info

You can learn how to authenticate with the Clarifai platform here.

Similarity Search on Uploaded Texts

You can create a Clarifai vector store from a list of texts. You can upload each text with its respective metadata to a Clarifai application. You can then use your Clarifai application to perform a semantic search and find contextually relevant texts.

Here is an example.

######################################################################################################
# In this section, we set the user authentication, user and app ID, and the text data we want to
# upload to the specified app. Change these strings to run your own example.
#####################################################################################################

# Your PAT (Personal Access Token) can be found in the Account's Security section
PAT = 'YOUR_PAT_HERE'
# Specify the correct user_id/app_id pairings
USER_ID = 'YOUR_USER_ID_HERE'
APP_ID = 'YOUR_APP_ID_HERE'
# Specify the texts to upload
texts = [
"I really enjoy spending time with you",
"I hate spending time with my dog",
"I want to go for a run",
"I went to the movies yesterday",
"I love playing soccer with my friends",
]
# Optionally, specify the number of documents to return
NUMBER_OF_DOCS = 4

############################################################################
# YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE TO RUN THIS EXAMPLE
############################################################################

# Import the required modules
from langchain.text_splitter import CharacterTextSplitter
from langchain.document_loaders import TextLoader
from langchain.vectorstores import Clarifai

# Specify list of metadatas
metadatas = [{"id": i, "text": text, "source": "book 1", "category": ["books", "modern"]} for i, text in enumerate(texts)]

# Create a Clarifai vector store from a list of texts
clarifai_vector_db = Clarifai.from_texts(
user_id=USER_ID,
app_id=APP_ID,
texts=texts,
pat=PAT,
number_of_docs=NUMBER_OF_DOCS,
metadatas=metadatas
)

# Run similarity search using Clarifai
docs = clarifai_vector_db.similarity_search("I would love to see you")

print(docs)

Output Example
[Document(page_content='I really enjoy spending time with you', metadata={'text': 'I really enjoy spending time with you', 'id': 0.0, 'category': ['books', 'modern'], 'source': 'book 1'}), Document(page_content='I want to go for a run', metadata={'text': 'I want to go for a run', 'source': 'book 1', 'category': ['books', 'modern'], 'id': 2.0}), Document(page_content='I went to the movies yesterday', metadata={'text': 'I went to the movies yesterday', 'category': ['books', 'modern'], 'id': 3.0, 'source': 'book 1'}), Document(page_content='I love playing soccer with my friends', metadata={'category': ['books', 'modern'], 'id': 4.0, 'text': 'I love playing soccer with my friends', 'source': 'book 1'})]

You can also leverage metadata filters to enhance the filtering capabilities within an app.

# This one will limit the similarity query to only the texts that have key of "source" matching value of "book 1"
book1_similar_docs = clarifai_vector_db.similarity_search("I would love to see you", filter={"source": "book 1"})

# You can also use lists in the input's metadata and then select things that match an item in the list. This is useful for categories like below:
book_category_similar_docs = clarifai_vector_db.similarity_search("I would love to see you", filter={"category": ["books"]})

Similarity Search on Uploaded Web Documents

You can create a Clarifai vector store from a list of web documents. You can upload each document with its respective metadata to a Clarifai application.

You can then use your Clarifai application to perform a semantic search and find contextually relevant documents.

Here is an example.

note

We’ll use the unstructured library to extract clean text and prepare the raw source documents for downstream tasks. You can install it by running pip install unstructured.

##########################################################################################################
# In this section, we set the user authentication, user and app ID, model ID, and the text
# documents we want to upload to the specified app. Change these strings to run your own example.
##########################################################################################################

# Your PAT (Personal Access Token) can be found in the Account's Security section
PAT = 'YOUR_PAT_HERE'
# Specify the correct user_id/app_id pairings
USER_ID = 'YOUR_USER_ID_HERE'
APP_ID = 'YOUR_APP_ID_HERE'
# Specify the URLs of the documents to upload
URLs = ["https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023", "https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023"]
# Specify the text to search for
TEXT_SEARCH = "Texts related to Russia attacks"
# Optionally, specify the number of documents to return
NUMBER_OF_DOCS = 4

############################################################################
# YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE TO RUN THIS EXAMPLE
############################################################################

# Import the required modules
from langchain.text_splitter import CharacterTextSplitter
from langchain.document_loaders import UnstructuredURLLoader
from langchain.vectorstores import Clarifai

# Load files from remote URLs using the unstructured library
loader = UnstructuredURLLoader(urls=URLs)
documents = loader.load()

# Split text into chunks
text_splitter = CharacterTextSplitter(chunk_size=2000, chunk_overlap=0)
docs = text_splitter.split_documents(documents)

# Create a Clarifai vector store from the documents
clarifai_vector_db = Clarifai.from_documents(
user_id=USER_ID,
app_id=APP_ID,
documents=docs,
pat=PAT,
number_of_docs=NUMBER_OF_DOCS
)

# Run similarity search using Clarifai
docs = clarifai_vector_db.similarity_search(TEXT_SEARCH)

print(docs)
Output Example
[Document(page_content='https://t.me/zoda_gov_ua/16505\xa0\xa0;\n\nhttps://t.me/vilkul/2680\xa0\xa0;\n\nhttps://t.me/Yevtushenko_E/2419\n\n[48]\xa0https://t.me/mykolaivskaODA/4236\xa0;\xa0\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCX...\xa0;\xa0\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02kL8XZwXNsSUphpcF5S...\xa0;\xa0https://t.me/khersonskaODA/3607\n\n[49]\xa0https://podolyaka dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/; https://stolica-s dot su/archives/366231; https://t.me/rybar/43402\n\n[50]\xa0https://isw.pub/UkrWar020723; https://t.me/concordgroup_official/425; https://t.me/Prigozhin_hat/2612\n\n[51]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[52]\xa0https://t.me/agentstvonews/2482\n\n[53]\xa0https://t.me/agentstvonews/2482\xa0;\xa0https://isw.pub/UkrWar020123\n\n[54]\xa0https://t.me/turchak_andrey/1032\xa0;\xa0\xa0https://isw.pub/UkrWar122922\n\n[55]\xa0https://t.me/turchak_andrey/1032\n\n[56]\xa0https://t.me/turchak_andrey/1032\n\n[57]\xa0https://t.me/SALDO_VGA/363;\xa0https://t.me/SALDO_VGA/365\n\n[58]\xa0https://t.me/SALDO_VGA/363;\xa0https://t.me/SALDO_VGA/365\n\n[59]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[60]\xa0https://t.me/pushilindenis/3165\n\n[61]\xa0https://t.me/glava_lnr_info/745;\xa0https://t.me/glava_lnr_info/748\n\n[62]\xa0https://t.me/glava_lnr_info/745;\xa0https://t.me/glava_lnr_info/748\n\n[63]\xa0https://t.me/modmilby/22455; https://t.me/modmilby/22419\n\n[64]\xa0https://www.osw.waw.pl/sites/default/files/OSW-Report_Russia%E2%80%99s-B...\n\n[65]\xa0https://t.me/modmilby/22470\n\nTags\n\nUkraine Project\n\nFile Attachments:\n\nZaporizhia Battle Map Draft February 08,2023.png\n\nKherson-Mykolaiv Battle Map Draft February 08,2023.png\n\nDonetsk Battle Map Draft February 08,2023.png\n\nDraftUkraineCoTFebruary08,2023.png\n\nKharkiv Battle Map Draft February 08,2023.png\n\n1400 16th Street NW, Suite 515 Washington, DC 20036\n\nph (202) 293-5550\n\n©2007 – 2023 THE INSTITUTE FOR THE STUDY OF WAR', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023'}), Document(page_content='[37]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02opH8aKBK88janDxszu... https://twitter.com/IntelCrab/status/1623561968626941953?s=20&t=sp6Y-hSy... ; https://twitter.com/IntelCrab/status/1623562915331690500?s=20&t=sp6Y-hSy... ; https://twitter.com/IntelCrab/status/1623563711859290113?s=20&t=sp6Y-hSy... ;\xa0https://t.me/zoda_gov_ua/16537\xa0;\xa0https://t.me/skarlatop/976\xa0;\xa0https:...\n\n[38]\xa0https://t.me/Yevtushenko_E/2427\xa0;\xa0https://www.facebook.com/GeneralStaf...\n\n[39]\xa0https://t.me/grey_zone/17129\n\n[40]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[41]\xa0https://59 dot ru /text/gorod/2023/02/07/72040580/?utm_source=telegram&utm_medium=messenger&utm_campaign=59\n\n[42]\xa0https://59 dot ru /text/gorod/2023/02/07/72040580/?utm_source=telegram&utm_medium=messenger&utm_campaign=59\n\n[43]\xa0https://www.politnavigator dot net/my-vse-budem-udivleny-kogda-nachnjotsya-nastuplenie-rogov.html\n\n[44]\xa0https://isw.pub/UkrWar020223\n\n[45]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[46]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[47]\xa0https://t.me/pushilindenis/3166\n\n[48]\xa0https://t.me/BalitskyEV/778\xa0;\n\n[49]\xa0https://t.me/BalitskyEV/778\n\n[50]\xa0https://isw.pub/UkrWar011323\n\n[51]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[52]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[53]\xa0https://t.me/vrogov/7593;\xa0https://t.me/vrogov/7582\xa0;\xa0https://t.me/rea...\n\n[54]\xa0https://t.me/vrogov/7593\xa0;\xa0https://t.me/rybar/43417\n\n[55]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[56]\xa0https://t.me/modmilby/22518\n\n[57]\xa0https://t.me/modmilby/22515\n\n[58]\xa0https://t.me/grey_zone/17123\n\nFile Attachments:\n\nZaporizhia Battle Map Draft February 09,2023.png\n\nKherson-Mykolaiv Battle Map Draft February 09,2023.png\n\nDonetsk Battle Map Draft February 09,2023.png\n\nKharkiv Battle Map Draft February 09,2023.png\n\nDraftUkraineCoTFebruary09,2023.png\n\n1400 16th Street NW, Suite 515 Washington, DC 20036\n\nph (202) 293-5550', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'}), Document(page_content='[3]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[4]\xa0https://t.me/rybar/43387;\xa0https://t.me/notes_veterans/7845;\xa0https://t....\n\n[5]https://www.understandingwar.org/sites/default/files/Russian%20Operation...\n\n[6]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[7]\xa0https://t.me/ostorozhno_novosti/14167\n\n[8]\xa0https://isw.pub/UkrWar020323\xa0;\xa0https://isw.pub/UkrWar020423\n\n[9]\xa0https://t.me/ostorozhno_novosti/14167\n\n[10]\xa0https://podolyaka\xa0dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/;\xa0https://stolica-s\xa0dot su/archives/366231;\xa0https://t.me/rybar/43402\n\n[11]\xa0https://podolyaka\xa0dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/;\xa0https://stolica-s\xa0dot su/archives/366231;\xa0https://t.me/rybar/43402\n\n[12]\xa0https://isw.pub/UkrWar011823\xa0;\xa0https://isw.pub/UkrWar010723\xa0;\n\n[13]\xa0https://isw.pub/UkrWar020623\xa0;\xa0https://isw.pub/UkrWar020123\n\n[14]\xa0https://www.gov.uk/government/news/new-sanctions-target-putins-war-machi...\n\n[15]\xa0https://www.cbsnews.com/news/ukraine-war-russia-iranian-drones-us-made-t...\n\n[16]\xa0https://suspilne\xa0dot media/amp/378863-de-okupanti-posiluut-prisutnist-na-harkivsini-dani-sinegubova/\n\n[17]\xa0https://t.me/kommunist/15598; https://understandingwar.org/backgrounder/russian-offensive-campaign-ass...\n\n[18]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCX...\n\n[19]\xa0https://t.me/strelkovii/3896\n\n[20]\xa0https://t.me/luhanskaVTSA/8438\n\n[21]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCX...\n\n[22]\xa0https://t.me/russkiy_opolchenec/35783; https://t.me/RVvoenkor/37711\n\n[23]\xa0https://t.me/rybar/43387;\xa0https://t.me/notes_veterans/7845\n\n[24]\xa0https://t.me/wargonzo/10782\n\n[25]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCX...\n\n[26]\xa0https://t.me/RKadyrov_95/3332\n\n[27]', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023'}), Document(page_content='[5]\xa0https://www.wsj.com/articles/moscow-tehran-advance-plans-for-iranian-des... ; https://tass dot\xa0ru/armiya-i-opk/16872633 ;\n\n[6]\xa0https://t.me/medvedev_telegram/265\xa0;\xa0https://www.reuters.com/world/eur...\n\n[7]\xa0https://www.cnn.com/2023/02/09/europe/1000-russian-tanks-destroyed-ukrai...\n\n[8]\xa0https://www.cnn.com/2023/02/09/europe/1000-russian-tanks-destroyed-ukrai...\n\n[9]\xa0https://www.businessinsider.com/captured-documents-say-elite-russian-unit-lost-tanks-kharkiv-ukraine-2022-5; https://rusi.org/explore-our-research/publications/commentary/getting-know-russian-battalion-tactical-group\n\nhttps://www.rbc dot ru/society/09/02/2023/63e3b0f79a7947b95a3c8cfc;\n\nhttps://t.me/rybar/43427;\n\nhttps://t.me/milinfolive/96749;\n\nhttps://t.me/rustroyka1945/8471;\n\nhttps://t.me/rustroyka1945/8475;\n\nhttps://t.me/rustroyka1945/8476;\n\nhttps://t.me/rustroyka1945/8477;\n\nhttps://t.me/rybar/43435;\n\nhttps://t.me/m0sc0wcalling/19454;\xa0https://t.me/m0sc0wcalling/19453;\n\nhttps://t.me/grey_zone/17119;\n\nhttps://t.me/grey_zone/17117;\n\nhttps://t.me/grey_zone/17116;\xa0https://t.me/grey_zone/17112;\n\nhttps://t.me/boris_rozhin/77624\n\n[11]\xa0https://t.me/grey_zone/17119; https://t.me/grey_zone/17117; https://t.me/grey_zone/17116; https://t.me/grey_zone/17112\n\n[12]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign... https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[13]\xa0https://t.me/RKadyrov_95/3334;\xa0https://eng.kavkaz-uzel\xa0dot eu/articles/62013/;\xa0https://eng.kavkaz-uzel\xa0dot eu/articles/62012/\n\n[14]\xa0https://ria\xa0dot ru/20230209/kadyrov-1850804605.html\n\n[15]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...\n\n[16]\xa0https://t.me/rybar/43443; https://t.me/dva_majors/8915\n\n[17]\xa0https://t.me/mod_russia/24064\n\n[18]\xa0https://m.facebook.com/story.php?story_fbid=pfbid0PHvkPzQjU7XJexyyQKsrJ4...\n\n[19]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...\n\n[20]\xa0https://t.me/wargonzo/10787', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'})]

Similarity Search on Existing Applications

Most users are likely to have already added data to their Clarifai applications before engaging with LangChain.

In this example, we will leverage the existing data within an application to perform a semantic search and find relevant documents.

####################################################################################################
# In this section, we set the user authentication, user, and ID of the app already existing on
# Clarifai. Change these strings to run your own example.
###################################################################################################

# Your PAT (Personal Access Token) can be found in the Account's Security section
PAT = 'YOUR_PAT_HERE'
# Specify the correct user_id/app_id pairings
USER_ID = 'YOUR_USER_ID_HERE'
APP_ID = 'YOUR_APP_ID_HERE'

# Optionally, specify the number of documents to return
NUMBER_OF_DOCS = 4

# Specify the text to search for
TEXT_SEARCH = "Texts related to criminals and violence"

############################################################################
# YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE TO RUN THIS EXAMPLE
############################################################################

# Import the required modules
from langchain.vectorstores import Clarifai
clarifai_vector_db = Clarifai(
user_id=USER_ID,
app_id=APP_ID,
pat=PAT,
number_of_docs=NUMBER_OF_DOCS,
)

# Perform the search
docs = clarifai_vector_db.similarity_search(TEXT_SEARCH)

print(docs)
Output Example
[Document(page_content='[37]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02opH8aKBK88janDxszu... https://twitter.com/IntelCrab/status/1623561968626941953?s=20&t=sp6Y-hSy... ; https://twitter.com/IntelCrab/status/1623562915331690500?s=20&t=sp6Y-hSy... ; https://twitter.com/IntelCrab/status/1623563711859290113?s=20&t=sp6Y-hSy... ;\xa0https://t.me/zoda_gov_ua/16537\xa0;\xa0https://t.me/skarlatop/976\xa0;\xa0https:...\n\n[38]\xa0https://t.me/Yevtushenko_E/2427\xa0;\xa0https://www.facebook.com/GeneralStaf...\n\n[39]\xa0https://t.me/grey_zone/17129\n\n[40]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[41]\xa0https://59 dot ru /text/gorod/2023/02/07/72040580/?utm_source=telegram&utm_medium=messenger&utm_campaign=59\n\n[42]\xa0https://59 dot ru /text/gorod/2023/02/07/72040580/?utm_source=telegram&utm_medium=messenger&utm_campaign=59\n\n[43]\xa0https://www.politnavigator dot net/my-vse-budem-udivleny-kogda-nachnjotsya-nastuplenie-rogov.html\n\n[44]\xa0https://isw.pub/UkrWar020223\n\n[45]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[46]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[47]\xa0https://t.me/pushilindenis/3166\n\n[48]\xa0https://t.me/BalitskyEV/778\xa0;\n\n[49]\xa0https://t.me/BalitskyEV/778\n\n[50]\xa0https://isw.pub/UkrWar011323\n\n[51]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[52]\xa0http://kremlin\xa0dot ru/events/president/news/70482\n\n[53]\xa0https://t.me/vrogov/7593;\xa0https://t.me/vrogov/7582\xa0;\xa0https://t.me/rea...\n\n[54]\xa0https://t.me/vrogov/7593\xa0;\xa0https://t.me/rybar/43417\n\n[55]\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign...\n\n[56]\xa0https://t.me/modmilby/22518\n\n[57]\xa0https://t.me/modmilby/22515\n\n[58]\xa0https://t.me/grey_zone/17123\n\nFile Attachments:\n\nZaporizhia Battle Map Draft February 09,2023.png\n\nKherson-Mykolaiv Battle Map Draft February 09,2023.png\n\nDonetsk Battle Map Draft February 09,2023.png\n\nKharkiv Battle Map Draft February 09,2023.png\n\nDraftUkraineCoTFebruary09,2023.png\n\n1400 16th Street NW, Suite 515 Washington, DC 20036\n\nph (202) 293-5550', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'}), Document(page_content="We do not report in detail on Russian war crimes because those activities are well-covered in Western media and do not directly affect the military operations we are assessing and forecasting. We will continue to evaluate and report on the effects of these criminal activities on the Ukrainian military and population and specifically on combat in Ukrainian urban areas. We utterly condemn these Russian violations of the laws of armed conflict, Geneva Conventions, and humanity even though we do not describe them in these reports.\n\nRussian Main Effort—Eastern Ukraine (comprised of two subordinate main efforts)\n\nRussian Subordinate Main Effort #1—Capture the remainder of Luhansk Oblast and push westward into eastern Kharkiv Oblast and encircle northern Donetsk Oblast\n\nRussian Subordinate Main Effort #2—Capture the entirety of Donetsk Oblast\n\nRussian Supporting Effort—Southern Axis\n\nRussian Mobilization and Force Generation Efforts\n\nActivities in Russian-occupied Areas\n\nRussian Main Effort—Eastern Ukraine\n\nRussian Subordinate Main Effort #1- Luhansk Oblast (Russian objective: Capture the remainder of Luhansk Oblast and continue offensive operations into eastern Kharkiv Oblast and northern Donetsk Oblast)\n\nISW continues to assess that Russia's most likely course of action (MLCOA) is an imminent offensive effort in Luhansk Oblast and is therefore adjusting the structure of the daily campaign assessments. We will no longer include the Eastern Kharkiv and Western Luhansk Oblast area as part of Ukrainian counteroffensives and will assess this area as a subordinate part of the Russian main effort in Eastern Ukraine. The assessment of Luhansk Oblast as part of the Russian main effort does not preclude the possibility of continued Ukrainian counteroffensive actions here or anywhere else in theater in the future. ISW will report on Ukrainian counteroffensive efforts as they occur.", metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'}), Document(page_content='[21]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...\n\n[22]\xa0https://t.me/milchronicles/1542\n\n[23]\xa0https://t.me/wargonzo/10787;\xa0https://t.me/readovkanews/52337\n\n[24]\xa0https://t.me/milinfolive/96786\xa0; https://t.me/rlz_the_kraken/56339\n\n[25]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...\n\n[26]\xa0https://t.me/wargonzo/10787\n\n[27]\xa0https://t.me/nm_dnr/9867;\xa0https://t.me/boris_rozhin/77599\n\n[28]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...\n\n[29]\xa0https://t.me/wargonzo/10787\n\n[30]\xa0https://twitter.com/Tatarigami_UA/status/1623436287171776514?s=20&t=mlsf...\n\n[31]\xa0https://twitter.com/Tatarigami_UA/status/1623436287171776514?s=20&t=mlsf...\n\nhttps://twitter.com/UAWeapons/status/1623649601717772288;\n\nhttps://twitter.com/Osinttechnical/status/1623532179220500480;\n\nhttps://t.me/m0sc0wcalling/19484;\n\nhttps://twitter.com/fdov21/status/1623453631629467650?s=20&t=u8lPsoZX5qq...\n\nhttps://twitter.com/markito0171/status/1623418942025785344?s=20&t=_NUJZh...\n\nhttps://twitter.com/markito0171/status/1623426654004469760?s=20&t=_NUJZh...\n\nhttps://twitter.com/markito0171/status/1623598095924711425?s=20&t=_NUJZh...\n\nhttps://t.me/m0sc0wcalling/19484\n\n[33]\xa0https://twitter.com/UAWeapons/status/1623649601717772288;\xa0https://twitt...\n\n[34]\xa0https://twitter.com/Militarylandnet/status/1623386771282075676?s=20&t=dd...\n\n[35]\xa0https://t.me/rusichtank/94 ; https://twitter.com/3_bm15/status/1623670248699310080?s=20&t=APP4gCFnjvU... ; https://twitter.com/3_bm15/status/1623670378458411009?s=20&t=APP4gCFnjvU... ; https://twitter.com/GeoConfirmed/status/1623730058211778563?s=20&t=APP4g...\n\n[36]\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02LGCyzg9CHrzXTN98Pj...', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'}), Document(page_content='A prominent Wagner-linked Russian milblogger called for the dismissal of Russian Defense Minister Sergei Shoigu over a Russian military uniform procurement scandal.\xa0Many prominent Russian military bloggers harshly criticized Shoigu and the Russian Ministry of Defense (MoD) over news that the 22-year-old son of the Russian Deputy Head of the Federal Agency for State Property Management won a contract to supply the Russian military with new uniforms.[10]\xa0The milbloggers argued that the new uniforms are of inferior quality and overpriced (costing about 130,000-210,000 rubles or $1,780 - $2,875 per uniform) and are part of a petty corruption scheme to enrich the families of Russian defense officials. The Grey Zone Telegram channel—a prominent Wagner Group-affiliated milblogger – wrote an explicative-laden rant to its 426,000 subscribers that Shoigu has lost credibility in front of the Russian nation and that Russian President Vladimir Putin can amend the situation by firing Shoigu, Shoigu’s "entourage" in the Russian General Staff and banning Shoigu and his associates from all Russian military affairs.[11]\xa0This is the latest episode in a string of events that has prompted Russian military blogger communities to attack the Russian MoD and senior Kremlin officials for petty corruption and ineptitude resulting in battlefield failures and worse quality of life for average Russian soldiers.[12]', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023'})]
info

You can explore the LangChain documentation to learn more on how to use the framework with the Clarifai vector store.