langchain/docs
Quentin Pleplé 126d7f11dd
Fix notebook example (#3142)
The following calls were throwing an exception:


575b717d10/docs/use_cases/evaluation/agent_vectordb_sota_pg.ipynb (L192)


575b717d10/docs/use_cases/evaluation/agent_vectordb_sota_pg.ipynb (L239)

Exception:

```
---------------------------------------------------------------------------
ValidationError                           Traceback (most recent call last)
Cell In[14], line 1
----> 1 chain_sota = RetrievalQA.from_chain_type(llm=OpenAI(temperature=0), chain_type="stuff", retriever=vectorstore_sota, input_key="question")

File ~/github/langchain/venv/lib/python3.9/site-packages/langchain/chains/retrieval_qa/base.py:89, in BaseRetrievalQA.from_chain_type(cls, llm, chain_type, chain_type_kwargs, **kwargs)
     85 _chain_type_kwargs = chain_type_kwargs or {}
     86 combine_documents_chain = load_qa_chain(
     87     llm, chain_type=chain_type, **_chain_type_kwargs
     88 )
---> 89 return cls(combine_documents_chain=combine_documents_chain, **kwargs)

File ~/github/langchain/venv/lib/python3.9/site-packages/pydantic/main.py:341, in pydantic.main.BaseModel.__init__()

ValidationError: 1 validation error for RetrievalQA
retriever
  instance of BaseRetriever expected (type=type_error.arbitrary_type; expected_arbitrary_type=BaseRetriever)
```

The vectorstores had to be converted to retrievers:
`vectorstore_sota.as_retriever()` and `vectorstore_pg.as_retriever()`.

The PR also:
- adds the file `paul_graham_essay.txt` referenced by this notebook
- adds to gitignore *.pkl and *.bin files that are generated by this
notebook

Interestingly enough, the performance of the prediction greatly
increased (new version of langchain or ne version of OpenAI models since
the last run of the notebook): from 19/33 correct to 28/33 correct!
2023-04-19 08:55:06 -07:00
..
_static docs: Quick fix to Mendable Search (#2876) 2023-04-13 23:15:57 -07:00
ecosystem fixed the Cohere example title (#3053) 2023-04-17 21:02:52 -07:00
getting_started slightly clearer docs (#3088) 2023-04-18 07:28:29 -07:00
modules Fix notebook example (#3142) 2023-04-19 08:55:06 -07:00
reference Adding milvus/zilliz into docs (#2686) 2023-04-10 18:08:41 -07:00
tracing bump version to 131 (#2391) 2023-04-04 07:21:50 -07:00
use_cases Fix notebook example (#3142) 2023-04-19 08:55:06 -07:00
conf.py docs: Mendable Search integration (#2803) 2023-04-13 21:52:25 -07:00
deployments.md Add link to repo for deploying LangChain to Digitalocean App Platform (#2894) 2023-04-14 08:55:21 -07:00
ecosystem.rst
gallery.rst [Docs] minor fixes to loaders links and rst warnings (#2846) 2023-04-13 10:54:40 -07:00
glossary.md big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
index.rst agent docs fixes (#3128) 2023-04-18 21:54:30 -07:00
make.bat
Makefile
model_laboratory.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
reference.rst Fix typo in docs/reference.rst (#3081) 2023-04-18 07:31:00 -07:00
requirements.txt Harrison/docs reqs (#2199) 2023-03-30 08:20:30 -07:00
tracing.md