use local embeddings from OllamaEmbeddings and Chroma.pip install chromadbfrom langchain.document_loaders import WebBaseLoaderloader = WebBaseLoader("https://lilianweng.github.io/posts/2023-06-23-agent/")data = loader.load()from langchain.text_splitter import RecursiveCharacterTextSplittertext_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=0)all_splits = text_splitter.split_documents(data)from langchain.vectorstores import Chromafrom langchain.embeddings import OllamaEmbeddingsvectorstore = Chroma.from_documents(documents=all_splits, embedding=OllamaEmbeddings())question = "What are the approaches to Task Decomposition?"docs = vectorstore.similarity_search(question)len(docs)    4from langchain.prompts import PromptTemplate# Prompttemplate = """[INST] <<SYS>> Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum and keep the answer as concise as possible. <</SYS>>{context}Question: {question}Helpful Answer:[/INST]"""QA_CHAIN_PROMPT = PromptTemplate(    input_variables=["context", "question"],    template=template,)# Chat modelfrom langchain.chat_models import ChatOllamafrom langchain.callbacks.manager import CallbackManagerfrom langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandlerchat_model = ChatOllama(model="llama2:13b",                        verbose=True,                        callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]))# QA chainfrom langchain.chains import RetrievalQAqa_chain = RetrievalQA.from_chain_type(    chat_model,    retriever=vectorstore.as_retriever(),    chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},)question = "What are the various approaches to Task Decomposition for AI Agents?"result = qa_chain({"query": question})     Based on the provided context, there are three approaches to task decomposition for AI agents:        1. LLM with simple
Ollama allows you to run open-source large language models, such as LLaMA2, locally.
Ollama allows you to run open-source large language models, such as LLaMA2, locally. ->: use local embeddings from OllamaEmbeddings and Chroma.pip install chromadbfrom langchain.document_loaders import WebBaseLoaderloader = WebBaseLoader("https://lilianweng.github.io/posts/2023-06-23-agent/")data = loader.load()from langchain.text_splitter import RecursiveCharacterTextSplittertext_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=0)all_splits = text_splitter.split_documents(data)from langchain.vectorstores import Chromafrom langchain.embeddings import OllamaEmbeddingsvectorstore = Chroma.from_documents(documents=all_splits, embedding=OllamaEmbeddings())question = "What are the approaches to Task Decomposition?"docs = vectorstore.similarity_search(question)len(docs)    4from langchain.prompts import PromptTemplate# Prompttemplate = """[INST] <<SYS>> Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum and keep the answer as concise as possible. <</SYS>>{context}Question: {question}Helpful Answer:[/INST]"""QA_CHAIN_PROMPT = PromptTemplate(    input_variables=["context", "question"],    template=template,)# Chat modelfrom langchain.chat_models import ChatOllamafrom langchain.callbacks.manager import CallbackManagerfrom langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandlerchat_model = ChatOllama(model="llama2:13b",                        verbose=True,                        callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]))# QA chainfrom langchain.chains import RetrievalQAqa_chain = RetrievalQA.from_chain_type(    chat_model,    retriever=vectorstore.as_retriever(),    chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},)question = "What are the various approaches to Task Decomposition for AI Agents?"result = qa_chain({"query": question})     Based on the provided context, there are three approaches to task decomposition for AI agents:        1. LLM with simple