langchain/docs/use_cases/evaluation
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
..
agent_benchmarking.ipynb Remove pythonrepl from LLM-MathChain (#2943) 2023-04-16 08:50:32 -07:00
agent_vectordb_sota_pg.ipynb Fix notebook example (#3142) 2023-04-19 08:55:06 -07:00
benchmarking_template.ipynb Harrison/agent eval (#1620) 2023-03-14 12:37:48 -07:00
data_augmented_question_answering.ipynb Typo docs - Update data_augmented_question_answering.ipynb propriterary-> proprietary (#2626) 2023-04-09 12:24:53 -07:00
huggingface_datasets.ipynb Update huggingface_datasets.ipynb (#1417) 2023-03-04 00:22:31 -08:00
llm_math.ipynb Harrison/llm math (#1808) 2023-03-20 07:53:26 -07:00
openapi_eval.ipynb Harrison/move eval (#2533) 2023-04-07 07:53:13 -07:00
qa_benchmarking_pg.ipynb WIP: Harrison/base retriever (#1765) 2023-03-24 07:46:49 -07:00
qa_benchmarking_sota.ipynb WIP: Harrison/base retriever (#1765) 2023-03-24 07:46:49 -07:00
qa_generation.ipynb Harrison/agent eval (#1620) 2023-03-14 12:37:48 -07:00
question_answering.ipynb fix typo (#2532) 2023-04-07 07:25:22 -07:00
sql_qa_benchmarking_chinook.ipynb Harrison/agent eval (#1620) 2023-03-14 12:37:48 -07:00