LangChain
This section details KDB.AI and the integration with LangChain.
KDB.AI can integrate with LangChain, which utilizes LLMs to offer a more human-like interaction.
LangChain is a framework designed to simplify the creation of applications using large language models. As a language model integration framework, LangChain's use-cases largely overlap with those of language models in general, including document analysis and summarization, chatbots, and code analysis. - Wikipedia
Check out the official LangChain repository on GitHub.
Getting Started
Prerequisites
- Python 3
- Pip
- Git
Install
#run
pip install langchain
git clone -b KDBAI_v1.4 https://github.com/KxSystems/langchain.git
cd langchain/libs/community
pip install .
#or
pip install ipython jupyter pyarrow openai pypdf tiktoken kdbai-client langchain
Start Jupyter
jupyter notebook
Examples
- Check out Building applications with LLMs through composability for KDB.AI 1.4.0. Run a Notebook example to use KDB.AI as a LangChain vector store. You need a KDB.AI endpoint and API keys for KDB.AI and OpenAI.
- Open the RAG sample and the RAG evaluation samplein our GitHub repo.
- Run the RAG and RAG evaluation notebooks directly in Google Colab.
- Watch this YouTube tutorial demonstrating Retrieval Augmented Generation with LangChain and Vector Databases.