langchain Questions
1
I'd like to combine a ConversationalRetrievalQAChain with - for example - the SerpAPI tool in LangChain.
I'm using ConversationalRetrievalQAChain to search through product PDFs that have been inges...
Fracture asked 10/7, 2023 at 11:47
0
I have around 30 GB of JSON data with multiple files, wanted build query bot on this.
I have built same with text file but i am not sure how it will work for JSON data.
I have explored JSONLoader b...
Poleaxe asked 3/9, 2023 at 5:46
2
I would like to pass to the retriever a similarity threshold. So far I could only figure out how to pass a k value but this was not what I wanted. How can I pass a threshold instead?
from langchain...
Kneeland asked 20/7, 2023 at 12:18
2
I am trying to provide a custom prompt for doing Q&A in langchain.
I wasn't able to do that with RetrievalQA as it was not allowing for multiple custom inputs in custom prompt.I have loaded a s...
Sporogony asked 16/7, 2023 at 10:4
1
I am trying to create chunks (max) 350 characters long with 100 chunk overlap.
I understand that chunk_size is an upper limit, so I may get chunks shorter than that. But why am I not getting any ch...
Enravish asked 13/7, 2023 at 15:56
2
I have the following code that implements LangChain + ChatGPT to answer questions from given data:
import { PineconeStore } from 'langchain/vectorstores/pinecone';
import { ConversationalRetrievalQ...
Brantley asked 6/7, 2023 at 1:11
1
I'm using LangChain to build a NL application. I want the interactions with the LLM to be recorded in a variable I can use for logging and debugging purposes. I have created a very simple chain:
fr...
Beck asked 8/6, 2023 at 14:36
2
Im creating a text document QA chatbot, Im using Langchainjs along with OpenAI LLM for creating embeddings and Chat and Pinecone as my vector Store.
See Diagram:
After successfully uploading embed...
Stout asked 18/6, 2023 at 18:41
1
I am looking for a way to limit the tokens per minute when saving embeddings in a Chroma vector store. Here is my code:
[...]
# split the documents into chunks
text_splitter = CharacterTextSplitter...
Razee asked 18/7, 2023 at 14:46
1
When we look at HuggingFaceHub model usage in langchain there's this part that the author doesn't know how to stop the generation, https://github.com/hwchase17/langchain/blob/master/langchain/llms/...
Spotlight asked 14/6, 2023 at 16:4
0
I am using Langchain to interact with a long piece of text. The text is split into chunks, which are passed in as the docs variable below.
I have set up a chain that streams my response, however I ...
Griseous asked 28/7, 2023 at 21:37
0
I want to query my mongo collection using LangChain.
Just like we have SQLDatabaseChain in LangChain to connect with a SQL database such as Postgres, do we have something similar to connect with a ...
Rajasthan asked 26/7, 2023 at 8:36
0
Trying to combine multiple memory types with a langchain conversational chain.
import os
from langchain.chains import ConversationChain
from langchain.memory import (
ConversationBufferMemory,
...
Villainy asked 25/7, 2023 at 18:56
2
I have written an application in langchain that passes a number of chains to a Sequential Chain to run. The problem I'm having is that the prompts are so large that they are exceeding the 4K token ...
Suchta asked 21/6, 2023 at 12:52
4
Solved
How do i add memory to RetrievalQA.from_chain_type? or, how do I add a custom prompt to ConversationalRetrievalChain?
For the past 2 weeks ive been trying to make a chatbot that can chat over docum...
Mar asked 13/5, 2023 at 2:43
3
Solved
I just have a newly created Environment in Anaconda (conda 22.9.0 and Python 3.10.10). Then I proceed to install langchain (pip install langchain if I try conda install langchain it does not work)....
Loosetongued asked 28/3, 2023 at 8:44
1
Solved
Whats the recommended way to define an output schema for a nested json, the method I use doesn't feel ideal.
# adding to planner -> from langchain.experimental.plan_and_execute import load_chat_...
Clinch asked 5/6, 2023 at 15:11
1
Solved
I'm just getting started with working with LLMs, particularly OpenAIs and other OSS models. There are a lot of guides on using LlamaIndex to create a store of all your documents and then query on t...
Audubon asked 24/6, 2023 at 12:12
2
Langchain have added this function ConversationalRetrievalChain which is used to chat over docs with history. According to their documentation here ConversationalRetrievalChain I need to pass promp...
Sialoid asked 4/5, 2023 at 15:49
1
Solved
I am a brand new user of Chroma database (and the associate python libraries).
When I call get on a collection, embeddings is always none, even if embeddings are explicitly set/defined when adding ...
Vassallo asked 15/6, 2023 at 13:27
5
I’m trying to use LangChain’s AzureOpenAI as below but getting this error.
Do you know how can I fix this?
openai.error.InvalidRequestError: Resource not found
# Import Azure OpenAI
from langchain....
Cassady asked 19/4, 2023 at 1:13
1
from langchain import PromptTemplate, HuggingFaceHub, LLMChain
import os
os.environ['HUGGINGFACEHUB_API_TOKEN'] = 'token'
# initialize HF LLM
flan_t5 = HuggingFaceHub(
repo_id="google/flan...
Lowbrow asked 16/5, 2023 at 17:34
2
Solved
I want to create a self hosted LLM model that will be able to have a context of my own custom data (Slack conversations for that matter).
I've heard Vicuna is a great alternative to ChatGPT and so ...
Errick asked 20/4, 2023 at 18:14
2
I am learning how to use langchain and I have written
a small exercise to try and figure out how agents work.
I have a small Python program that looks like this:
import os
from langchain.agents im...
1
Solved
Im using a conversational agent, with some tools, one of them is a calculator tool (for the sake of example).
Agent initializated as follows:
conversational_agent = initialize_agent(
agent='chat-c...
Governorship asked 30/5, 2023 at 12:1
© 2022 - 2024 — McMap. All rights reserved.