LangChain Flowise AI

LangChain Flowise AI

LangChain is a tool that helps create smart applications using language models, making them understand context and make decisions.

Flowise AI is a part of LangChain that lets people easily see and build these applications without needing to code, by simply dragging and dropping items. This makes the complex task of creating advanced language model applications simple and straightforward.

With reference to earlier post (https://www.dhirubhai.net/posts/sanketterdal_langchain-retrieval-augmented-generation-activity-7119728460943491073-Eia8?utm_source=share&utm_medium=member_desktop), lets try to implement below workflow using Flowise.


LangChain - Flowise Demo

Its just takes 15 minutes.


Pre-Requisites


Step By Step Workflow

PDF Loader

Use document loaders to load data from a source

Recursively split by character

Recursive Splitting is a way to break down text into smaller parts using certain characters like spaces or new lines. It uses a list of characters to do this, going through them one by one, and keeps breaking down the text until the pieces are small enough. By default, it first tries to split with two new lines, then one new line, then a space, and lastly, an empty character.

Pinecone

In Pinecone, "upsert" is a way to add new pieces of information or update old ones. The term "Pinecone Upsert Document" might refer to a specific part in a system where you put in details to add or change information in Pinecone. It's like telling Pinecone, "Here's some new info, please keep it or replace the old info with it." So, using "upsert," you can easily manage your information in Pinecone, whether you're adding new stuff or changing what's already there.

OpenAI Embeddings

The OpenAI Embeddings class uses the OpenAI API to generate embeddings for a given text

Vector store-backed retriever

A vector store retriever is a tool that helps find documents using a special storage place called a vector store. It's like a helper that makes the vector store easy to use for finding documents. It uses certain searching methods, like looking for similar items, to find the texts in the vector store.

Conversational Retrieval QA

When you use tools like LangChain to get answers from a system, sometimes you might ask follow-up questions based on previous chats.

To fix this, before looking for an answer, the system can combine the earlier chat and the new question into one big question.

In technical terms, this involves adding a step to combine the chat history and new question, then doing the usual steps to find and give back an answer. And for this, you need a tool called a retriever that helps in finding relevant info to answer your question, which can be set up using something called a vector store created from embeddings.

ChatOpenAI

Wrapper around OpenAI large language models that use the Chat endpoint.

Complete Workflow

Conclusion

LangChain and Flowise are tools that help make smart apps which can understand and talk back to us in a helpful way. They make it easier for more people to create these apps, even if they don't know how to code. A special feature is that they can understand follow-up questions by looking at what was asked before, making conversations with the app feel more natural. This is done using a helper tool that searches for the right information to answer your questions. As we explore more in this area, LangChain and Flowise show a promising way to make apps smarter and easier to talk to.

References


Nicola A.

Co-founder, COO Pigro - Power up your workspace with Pigro website: pigro.ai

11 个月

Building a solution that works for every application is hard. We recently released a solution to split documents into optimal chunks of text. We split PDF and Office files based on the original document structure and content semantics.

回复

要查看或添加评论,请登录

Sanket Terdal的更多文章

  • ASP.NET Blazor for Next.js Professionals

    ASP.NET Blazor for Next.js Professionals

    Introduction If you're coming from a React or Next.js background, ASP.

    3 条评论
  • Flowise, LangChain & Integrations

    Flowise, LangChain & Integrations

    Here in this post, we are going to see demo of Flowise, Lang chain and integration with different various services to…

    1 条评论
  • Chrome Extension Powered by OpenAI API

    Chrome Extension Powered by OpenAI API

    Introduction In today’s digital age, with the vast amount of information available on the internet, it can be…

  • Chrome Extension: Combining Google Search and OpenAI API for Smarter Results

    Chrome Extension: Combining Google Search and OpenAI API for Smarter Results

    Introduction This article talks about the growing need for intelligent applications and tools in the digital world and…

  • Experience the Power of AI Chatbot Technology with GPTChat!

    Experience the Power of AI Chatbot Technology with GPTChat!

    ChatGPT and OpenAI In this blog we will explore the exciting world of natural language processing (NLP) and its…

  • Web 2.0 to Web 3.0

    Web 2.0 to Web 3.0

    Web 2.0 to Web 3.

    5 条评论
  • AWS Security - KMS

    AWS Security - KMS

    Introduction AWS provides services that help you protect your data, accounts, and workloads from unauthorized access…

  • GraphQL & REST APIs

    GraphQL & REST APIs

    Introduction What is GraphQL ? GraphQL is a specification to query APIs. It provides a server-side runtime to execute…

  • React v18.0 hooks — useTransition & useDeferredValue

    React v18.0 hooks — useTransition & useDeferredValue

    React 18 and Concurrency Before React 18.0, all UI updates were performed without any prioritization and don’t have…

社区洞察

其他会员也浏览了