langchain/docs/modules
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
..
agents Notebook Nit (#3125) 2023-04-18 22:43:52 -07:00
callbacks Add docs for callbacks (#2643) 2023-04-10 10:23:11 -07:00
chains Update sql chain notebook to clarify use of SQLAlchemy for connections (#2850) 2023-04-13 11:46:59 -07:00
indexes Harrison/output error (#3094) 2023-04-18 08:59:56 -07:00
memory Examples fixed (#3042) 2023-04-17 20:25:01 -07:00
models Working example for Anthropic (#3151) 2023-04-19 08:52:33 -07:00
prompts Fix docs for parse_with_prompt (#2986) 2023-04-16 12:57:04 -07:00
agents.rst Minor text correction (#2298) 2023-04-02 13:54:42 -07:00
chains.rst big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
indexes.rst Correct typo in documentation for word 'therefore' (#2529) 2023-04-06 23:20:30 -07:00
memory.rst big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
models.rst big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
paul_graham_essay.txt Fix notebook example (#3142) 2023-04-19 08:55:06 -07:00
prompts.rst big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
state_of_the_union.txt Docs refactor (#480) 2023-01-02 08:24:09 -08:00