Introduction of ️LangChain

 

https://assets.st-note.com/production/uploads/images/94297454/rectangle_large_type_2_91064e9f21492d5520c7b612794783c4.png?width=800 


All information about LangChain is in this website: https://docs.langchain.com/docs/


In summary, LangChain is a great framework to develop complex applications or programs which are based on LLMs (language models like Chatgpt). We may be familiar with the progress of chatting with chatbox, where we input a prompt and get an output. But sometimes our needs are complicated. For example:


  •  I have trouble in uploading pdf/docx/txt/csv... files into chatbox, let alone my google calendar

  • Chatgpt doesn't have access to Internet or any APIs like weather API/ Wikipedia API... 

  • It's hard to let chatbox do repeated tasks 

  • Sometimes an output of an prompt is a key composition of another prompt

 All of these tasks can be accomplished by using LangChain. To be specific, LangChain can: 

  • quickly load documents of various forms by using "Document Loader"(even Bilibili/Google Drive/Huawei file/Twitter....)data_connection_diagram

  • help us build a prompt template with less efforts. So we can just input a new query every time instead of reconstruct the whole prompt

  • combine different tasks by passing data through models. It's called a chain

LangChain tutorial #1: Build an LLM-powered app in 18 lines of code https://datasciencedojo.com/wp-content/uploads/QA-Chahtbot-Architecture.png

 

Certainly there are other fancy functions like memorizing chat history, splitting origin data into parts to cut expenses, similarity search... But it's too late now so I would leave them next time.

Comments

Popular Posts