Update langchain.md

This commit is contained in:
Jai
2023-04-26 14:50:09 -07:00
committed by GitHub
parent ca8d8e82b7
commit aa23d911f5

View File

@@ -2,6 +2,8 @@
## simple Pandas 2.0 documentation Q&A answering bot using LangChain
<img id="splash" src="https://user-images.githubusercontent.com/917119/234710587-3b488467-e8a4-46ec-b377-fe24c17eecca.png"/>
To demonstrate using Lance, were going to build a simple Q&A answering bot using LangChain — an open-source framework that allows you to build composable LLM-based applications easily. Well use chat-langchain, a simple Q&A answering bot app as an example. Note: in this fork of chat-langchain, were also using a forked version of LangChain integration where weve built a Lance integration.
The first step is to generate embeddings. You could build a bot using your own data, like a wiki page or internal documentation. For this example, were going to use the Pandas API documentation. LangChain offers document loaders to read and pre-process many document types. Since the Pandas API is in HTML, reading the docs is straightforward:
@@ -12,4 +14,4 @@ for p in Path("./pandas.documentation").rglob("*.html"):
continue
loader = UnstructuredHTMLLoader(p)
raw_document = loader.load()
docs = docs + raw_document
docs = docs + raw_document