# \#langchain

**URL:** https://community.openai.com/tag/langchain/43.md

[Latest](https://community.openai.com/latest.md) · [Categories](https://community.openai.com/categories.md) · [Tags](https://community.openai.com/tags.md)

---

## [How should enterprise AI agents cache, refresh, and select skills in runtime?](https://community.openai.com/t/how-should-enterprise-ai-agents-cache-refresh-and-select-skills-in-runtime/1406914)

<div class="topic-metadata">

**Author:** [@suresandeep03](https://community.openai.com/u/suresandeep03)\
**Replies:** 4\
**Last updated:** [October 17, 2026, 6:45am UTC](https://community.openai.com/t/how-should-enterprise-ai-agents-cache-refresh-and-select-skills-in-runtime/1406914 "2026-10-17T06:45:15Z")

</div>

Hi there, I’m are building an AI Agent that uses skill.md files. Each skill.md contains: Skill metadata skill\_name description examples business domain tags Execution instructions SQL query itself Snowflake execut…

---

## [OpenAI gpt-5-mini with\_structured\_output returns malformed JSON filled with whitespace instead of valid response](https://community.openai.com/t/openai-gpt-5-mini-with-structured-output-returns-malformed-json-filled-with-whitespace-instead-of-valid-response/1377686)

<div class="topic-metadata">

**Author:** [@Gevorg\_Gevorgyan](https://community.openai.com/u/Gevorg_Gevorgyan)\
**Replies:** 1\
**Last updated:** [August 24, 2026, 4:34pm UTC](https://community.openai.com/t/openai-gpt-5-mini-with-structured-output-returns-malformed-json-filled-with-whitespace-instead-of-valid-response/1377686 "2026-08-24T16:34:36Z")

</div>

I’m using LangChain’s ChatOpenAI.with\_structured\_output() with gpt-5-mini to classify user intent into a Pydantic model. Intermittently, the model returns malformed JSON — the response starts with a valid key but never c…

---

## [Does LangChain support OpenAI's Batch API?](https://community.openai.com/t/does-langchain-support-openais-batch-api/889280)

<div class="topic-metadata">

**Author:** [@henry5](https://community.openai.com/u/henry5)\
**Replies:** 2\
**Last updated:** [February 10, 2026, 10:11pm UTC](https://community.openai.com/t/does-langchain-support-openais-batch-api/889280 "2026-02-10T22:11:00Z")

</div>

Does LangChain support OpenAI’s Batch API? How should I use it in LangChain? I couldn’t find detailed information about the OpenAI Batch API in the LangChain documentation.

---

## [Work-in-Progress: Building a Knowledge Tree with LangChain & OpenAI (Kalpavriksh)](https://community.openai.com/t/work-in-progress-building-a-knowledge-tree-with-langchain-openai-kalpavriksh/1352036)

<div class="topic-metadata">

**Author:** [@Vageesh\_Goawami](https://community.openai.com/u/Vageesh_Goawami)\
**Replies:** 0\
**Last updated:** [August 20, 2025, 6:54am UTC](https://community.openai.com/t/work-in-progress-building-a-knowledge-tree-with-langchain-openai-kalpavriksh/1352036 "2025-08-20T06:54:34Z")

</div>

Hello everyone, I’m excited to share a project I’m currently in the early stages of building: Kalpavriksh, an AI-powered learning platform that “grows a knowledge tree” to explain any concept. The vision is to go beyon…

---

## [Gpt-4.1 is not invoking tools but with same prompt and everything gpt-4.1-mini is doing it](https://community.openai.com/t/gpt-4-1-is-not-invoking-tools-but-with-same-prompt-and-everything-gpt-4-1-mini-is-doing-it/1330855)

<div class="topic-metadata">

**Author:** [@Dilkush\_Singh](https://community.openai.com/u/Dilkush_Singh)\
**Replies:** 4\
**Last updated:** [August 5, 2025, 5:02am UTC](https://community.openai.com/t/gpt-4-1-is-not-invoking-tools-but-with-same-prompt-and-everything-gpt-4-1-mini-is-doing-it/1330855 "2025-08-05T05:02:41Z")

</div>

So I’m working on a LangChain Agent, and for that when I’m using gpt-4.1 as LLM in Agent, the Agent is not invoking any tools, but when I keep everything(prompts, tools, etc.) same and just change the model to gpt-4.1-mi…

---

## [What do you think about langchain?](https://community.openai.com/t/what-do-you-think-about-langchain/575807)

<div class="topic-metadata">

**Author:** [@Man](https://community.openai.com/u/Man)\
**Replies:** 12\
**Last updated:** [February 26, 2024, 3:59pm UTC](https://community.openai.com/t/what-do-you-think-about-langchain/575807 "2024-02-26T15:59:10Z")

</div>

There were posts about the langchain library in this forum earlier, but it hasn’t been mentioned so much recently. Are you using it? Is it good? Is it still relevant? Has another standard surpassed it?

---

## [Create chatbot to assist lawyers based on uploading the law file (Saudi law)](https://community.openai.com/t/create-chatbot-to-assist-lawyers-based-on-uploading-the-law-file-saudi-law/1010476)

<div class="topic-metadata">

**Author:** [@m.yazan](https://community.openai.com/u/m.yazan)\
**Replies:** 4\
**Last updated:** [May 14, 2025, 5:02am UTC](https://community.openai.com/t/create-chatbot-to-assist-lawyers-based-on-uploading-the-law-file-saudi-law/1010476 "2025-05-14T05:02:26Z")

</div>

Hello, i have a case that i have all the Saudi law as (pdf, txt) i need to upload the whole law files and by the time i will have to upload cases what i want to ask i want the best approach to achieve this Use Case C…

---

## [Langchain RAG with conversation memory](https://community.openai.com/t/langchain-rag-with-conversation-memory/760338)

<div class="topic-metadata">

**Author:** [@a.naujokas](https://community.openai.com/u/a.naujokas)\
**Replies:** 4\
**Last updated:** [February 11, 2025, 6:41am UTC](https://community.openai.com/t/langchain-rag-with-conversation-memory/760338 "2025-02-11T06:41:59Z")

</div>

Hi, I want to use Pinecone database to limit gpt-3.5 knowledge. I found a good example here, which I want to use. (https://github.com/pinecone-io/examples/blob/master/learn/generation/langchain/handbook/05-langchain-ret…

---

## [LangChain embeddings from bulk-loaded pdf documents](https://community.openai.com/t/langchain-embeddings-from-bulk-loaded-pdf-documents/1114437)

<div class="topic-metadata">

**Author:** [@lpm0073](https://community.openai.com/u/lpm0073)\
**Replies:** 1\
**Last updated:** [February 6, 2025, 4:52pm UTC](https://community.openai.com/t/langchain-embeddings-from-bulk-loaded-pdf-documents/1114437 "2025-02-06T16:52:59Z")

</div>

Greetings, i teach an AI course at university of british columbia, and i use this public repo for demonstrating how to use LangChain to bulk load a Pinecone vector database from a collection of pdf documents, and also ho…

---

## [LangChain vs File\_Search: Which is Better for Reducing GPT-4 Hallucinations?](https://community.openai.com/t/langchain-vs-file-search-which-is-better-for-reducing-gpt-4-hallucinations/953487)

<div class="topic-metadata">

**Author:** [@joaquin.marroquin](https://community.openai.com/u/joaquin.marroquin)\
**Replies:** 2\
**Last updated:** [January 6, 2025, 9:27am UTC](https://community.openai.com/t/langchain-vs-file-search-which-is-better-for-reducing-gpt-4-hallucinations/953487 "2025-01-06T09:27:13Z")

</div>

Hi, I’ve been working with an assistant using gpt4o-mini to retrieve data from a file through file\_search. Currently, it’s just one XML file, but the idea is to load around 10 files of the same type, reaching about 2MB o…

---

## [Finetune for langchain usage](https://community.openai.com/t/finetune-for-langchain-usage/1014565)

<div class="topic-metadata">

**Author:** [@nodiz](https://community.openai.com/u/nodiz)\
**Replies:** 0\
**Last updated:** [November 12, 2024, 11:37am UTC](https://community.openai.com/t/finetune-for-langchain-usage/1014565 "2024-11-12T11:37:34Z")

</div>

Hello everyone, I’m currently using the API through LangChain with structured output. From what I understand, this essentially configures a function calling setup where the Pydantic base model handles the output, and th…

---

## [Best Way to Process 2500 large PDFs for Specific Data Extraction?](https://community.openai.com/t/best-way-to-process-2500-large-pdfs-for-specific-data-extraction/1001862)

<div class="topic-metadata">

**Author:** [@hosseini99.zahra](https://community.openai.com/u/hosseini99.zahra)\
**Replies:** 2\
**Last updated:** [November 3, 2024, 7:55am UTC](https://community.openai.com/t/best-way-to-process-2500-large-pdfs-for-specific-data-extraction/1001862 "2024-11-03T07:55:32Z")

</div>

I’m working on a project to process 2500 PDF files (~50 pages each. I need to extract around 42 specific fields per document (e.g., Company Name, some numbers and percentages) using a language model like GPT to answer th…

---

## [Large time to complete RetrievalQA invokation](https://community.openai.com/t/large-time-to-complete-retrievalqa-invokation/989722)

<div class="topic-metadata">

**Author:** [@gintellect](https://community.openai.com/u/gintellect)\
**Replies:** 0\
**Last updated:** [October 23, 2024, 2:15pm UTC](https://community.openai.com/t/large-time-to-complete-retrievalqa-invokation/989722 "2024-10-23T14:15:42Z")

</div>

I am very new to implementation of embeddings. I wrote a simple application which reads the text from PDF, chunk it in 500 words each and using OpenAIEmbeddings and Chroma.from\_text method to create vectorstore on the di…

---

## [How to load all types of documents (.pdf, .txt, .docx, .csv, .excel) through document loader using Pinecone through Langchain wrapper?](https://community.openai.com/t/how-to-load-all-types-of-documents-pdf-txt-docx-csv-excel-through-document-loader-using-pinecone-through-langchain-wrapper/399488)

<div class="topic-metadata">

**Author:** [@hunterr](https://community.openai.com/u/hunterr)\
**Replies:** 5\
**Last updated:** [December 18, 2023, 11:30am UTC](https://community.openai.com/t/how-to-load-all-types-of-documents-pdf-txt-docx-csv-excel-through-document-loader-using-pinecone-through-langchain-wrapper/399488 "2023-12-18T11:30:30Z")

</div>

I am into creating an interactive chatbot that can take inputs from multiple data sources like pdf, word file, text file, excel files etc. I am using Pinecone retriever with Langchain wrapper on top of it. When I go for …

---

## [Table extraction using langchain and gpt3.5 or 4o](https://community.openai.com/t/table-extraction-using-langchain-and-gpt3-5-or-4o/926899)

<div class="topic-metadata">

**Author:** [@polerajeev7](https://community.openai.com/u/polerajeev7)\
**Replies:** 0\
**Last updated:** [August 30, 2024, 8:07am UTC](https://community.openai.com/t/table-extraction-using-langchain-and-gpt3-5-or-4o/926899 "2024-08-30T08:07:21Z")

</div>

So i am encountering this problem, where i only have to extract the tables in a pdf and i am new to this so am having a hard time understanding it. theres something wrong with my prompt? or code and what are the best pra…

---

## [AttributeError: module 'openai' has no attribute 'OpenAI' When Using 'langchain\_openai'](https://community.openai.com/t/attributeerror-module-openai-has-no-attribute-openai-when-using-langchain-openai/902143)

<div class="topic-metadata">

**Author:** [@lisek75](https://community.openai.com/u/lisek75)\
**Replies:** 4\
**Last updated:** [August 12, 2024, 11:05am UTC](https://community.openai.com/t/attributeerror-module-openai-has-no-attribute-openai-when-using-langchain-openai/902143 "2024-08-12T11:05:39Z")

</div>

I have a script that prompts the user to enter their OpenAI API key, validates it, and then uses the ChatOpenAI class from langchain\_openai to create an agent for interacting with a pandas DataFrame. However, when I ente…

---

## [Need help with GPT 4 batching using Langchain wrapper](https://community.openai.com/t/need-help-with-gpt-4-batching-using-langchain-wrapper/655852)

<div class="topic-metadata">

**Author:** [@RarelyRollins](https://community.openai.com/u/RarelyRollins)\
**Replies:** 1\
**Last updated:** [August 1, 2024, 2:17am UTC](https://community.openai.com/t/need-help-with-gpt-4-batching-using-langchain-wrapper/655852 "2024-08-01T02:17:10Z")

</div>

hey guys, I am working with langchain wrapper to query GPT 4, now because of the cost incurred, I want to implement batching. However, I don’t know the right implementation for the same, My approach: I created a prompt…

---

## [Giving links to my documentation to the user](https://community.openai.com/t/giving-links-to-my-documentation-to-the-user/886823)

<div class="topic-metadata">

**Author:** [@ytyt](https://community.openai.com/u/ytyt)\
**Replies:** 2\
**Last updated:** [July 31, 2024, 12:08pm UTC](https://community.openai.com/t/giving-links-to-my-documentation-to-the-user/886823 "2024-07-31T12:08:25Z")

</div>

Hello everyone, I’ve built a chatbot for my company using the ChatGPT API and Langchain. It is currently linked to our Confluence database. Whenever I ask for the link of the page where it found the answer, it generates…

---

## [Enhancing Query Precision and Response Generation in a RAG-Based E-commerce Application](https://community.openai.com/t/enhancing-query-precision-and-response-generation-in-a-rag-based-e-commerce-application/882082)

<div class="topic-metadata">

**Author:** [@misripandya](https://community.openai.com/u/misripandya)\
**Replies:** 0\
**Last updated:** [July 26, 2024, 12:46pm UTC](https://community.openai.com/t/enhancing-query-precision-and-response-generation-in-a-rag-based-e-commerce-application/882082 "2024-07-26T12:46:41Z")

</div>

Context: We are developing a Retrieval-Augmented Generation (RAG) based application exclusively using Python. The system incorporates various models, including GPT-4, GPT-4 Turbo, and GPT-4o, for tasks such as web scr…

---

## [Chatbot interacting with enterprise postgresql database](https://community.openai.com/t/chatbot-interacting-with-enterprise-postgresql-database/875768)

<div class="topic-metadata">

**Author:** [@manogarantharun](https://community.openai.com/u/manogarantharun)\
**Replies:** 0\
**Last updated:** [July 22, 2024, 10:14am UTC](https://community.openai.com/t/chatbot-interacting-with-enterprise-postgresql-database/875768 "2024-07-22T10:14:05Z")

</div>

I am trying to develop a chatbot application that answers users question by converting natural language into a sql query. I am using langchain framework and storing the table metadata in the chroma db vector database and…

---

## [Use gpt-4o-mini ChatOpenAI, but gpt-3.5-turbo-0125 used](https://community.openai.com/t/use-gpt-4o-mini-chatopenai-but-gpt-3-5-turbo-0125-used/872665)

<div class="topic-metadata">

**Author:** [@saaspeter](https://community.openai.com/u/saaspeter)\
**Replies:** 3\
**Last updated:** [July 20, 2024, 3:18pm UTC](https://community.openai.com/t/use-gpt-4o-mini-chatopenai-but-gpt-3-5-turbo-0125-used/872665 "2024-07-20T15:18:40Z")

</div>

Hi: I am trying to use 'gpt-4o-mini' in ChatOpenAI, code like below: from langchain\_openai import ChatOpenAI OPENAI\_MODEL\_4oMini = "gpt-4o-mini" chatmodel = ChatOpenAI(model=OPENAI\_MODEL\_4oMini, tempera…

---

## [Can Agents be forced to use tools in Langchain?](https://community.openai.com/t/can-agents-be-forced-to-use-tools-in-langchain/848676)

<div class="topic-metadata">

**Author:** [@steve33](https://community.openai.com/u/steve33)\
**Replies:** 0\
**Last updated:** [July 1, 2024, 9:31am UTC](https://community.openai.com/t/can-agents-be-forced-to-use-tools-in-langchain/848676 "2024-07-01T09:31:52Z")

</div>

export const createAgentMethod = (llm: ChatOpenAI, tools: any\[\], prompt: ChatPromptTemplate): RunnableBinding\<ChainValues, AgentExecutorOutput\> =\> { const agent = createToolCallingAgent({ llm, tools, …

---

## [Need advice storing structured JSON to VectorDB](https://community.openai.com/t/need-advice-storing-structured-json-to-vectordb/845224)

<div class="topic-metadata">

**Author:** [@kuuhaku](https://community.openai.com/u/kuuhaku)\
**Replies:** 4\
**Last updated:** [July 1, 2024, 9:58am UTC](https://community.openai.com/t/need-advice-storing-structured-json-to-vectordb/845224 "2024-07-01T09:58:25Z")

</div>

Looking for some help, I’m a complete beginner to this So I have specific business profiles i would like to store and have an agent do Q&A on the businesses. What’s a good approach here? How should I store this payloa…

---

## [Langchain: Script fails sometimes](https://community.openai.com/t/langchain-script-fails-sometimes/804927)

<div class="topic-metadata">

**Author:** [@yogesh.perfect](https://community.openai.com/u/yogesh.perfect)\
**Replies:** 0\
**Last updated:** [June 6, 2024, 1:01pm UTC](https://community.openai.com/t/langchain-script-fails-sometimes/804927 "2024-06-06T13:01:23Z")

</div>

Hi, I am using langchain 4 python to create an agent and run 2 tools. It is supposed to take input queries about songs and return the API calls to spotify one needs to make. About half of times, my script works, retur…

---

## [Multi document comparision and Q/A](https://community.openai.com/t/multi-document-comparision-and-q-a/247574)

<div class="topic-metadata">

**Author:** [@mohamed.illiyas](https://community.openai.com/u/mohamed.illiyas)\
**Replies:** 10\
**Last updated:** [June 5, 2024, 3:26am UTC](https://community.openai.com/t/multi-document-comparision-and-q-a/247574 "2024-06-05T03:26:07Z")

</div>

I have encountered a few things while working on my experiments with GPT. Specifically, I have been attempting to compare two or more documents using GPT’s capabilities. To provide some context, I have two documents tha…

---

## [How to use langchain RAG to search data from JSON?](https://community.openai.com/t/how-to-use-langchain-rag-to-search-data-from-json/783236)

<div class="topic-metadata">

**Author:** [@jimmy871117](https://community.openai.com/u/jimmy871117)\
**Replies:** 0\
**Last updated:** [May 28, 2024, 9:10am UTC](https://community.openai.com/t/how-to-use-langchain-rag-to-search-data-from-json/783236 "2024-05-28T09:10:17Z")

</div>

Problem Description My JSON data looks like the following (3 entries shown), but there are actually thousands of entries. I hope that when the user inputs a keyword, they can search relevant data. For example, when they…

---

## [File\_ids in OpenAI Assistance](https://community.openai.com/t/file-ids-in-openai-assistance/783145)

<div class="topic-metadata">

**Author:** [@Daniel\_Costanza](https://community.openai.com/u/Daniel_Costanza)\
**Replies:** 0\
**Last updated:** [May 28, 2024, 7:56am UTC](https://community.openai.com/t/file-ids-in-openai-assistance/783145 "2024-05-28T07:56:26Z")

</div>

In my case, I want to retrieve the information from database in Natural Language. At first, I used Langchain’s create\_sql\_agent for that matter. I also want to try OpenAI Assistance to generate information but it require…

---

## [Designing and evaluating an ai "question and answer" system](https://community.openai.com/t/designing-and-evaluating-an-ai-question-and-answer-system/781866)

<div class="topic-metadata">

**Author:** [@healthitcoir](https://community.openai.com/u/healthitcoir)\
**Replies:** 1\
**Last updated:** [May 27, 2024, 3:38pm UTC](https://community.openai.com/t/designing-and-evaluating-an-ai-question-and-answer-system/781866 "2024-05-27T15:38:32Z")

</div>

Hi there, I want to design an AI customer answering system. I want to feed the history of previous questions and answers to this system. What would be your choice in choosing the best system between these options: – L…

---

## [Cannot upload files to Assistants from Langchain](https://community.openai.com/t/cannot-upload-files-to-assistants-from-langchain/738453)

<div class="topic-metadata">

**Author:** [@mfsi\_suryar](https://community.openai.com/u/mfsi_suryar)\
**Replies:** 2\
**Last updated:** [May 23, 2024, 9:27am UTC](https://community.openai.com/t/cannot-upload-files-to-assistants-from-langchain/738453 "2024-05-23T09:27:49Z")

</div>

I am trying to create one assistant agent in Langchain with multiple files through Langchain runnable = OpenAIAssistantRunnable(assistant\_id=assistant\_detail\['id'\], as\_agent=True) response = runnable.invoke({'content':…

---

## [Getting openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}](https://community.openai.com/t/getting-openai-notfounderror-error-code-404-error-code-404-message-resource-not-found/752828)

<div class="topic-metadata">

**Author:** [@joroz](https://community.openai.com/u/joroz)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 7:01am UTC](https://community.openai.com/t/getting-openai-notfounderror-error-code-404-error-code-404-message-resource-not-found/752828 "2024-05-23T07:01:31Z")

</div>

I keep getting NotFoundError when running the below code locally. It seems to work fine in Colab but as soon as I run it locally, the from\_documents method errors out. import data\_utils as du from dotenv import load\_dot…

[Next page](https://community.openai.com/tag/langchain/43.md?match_all_tags=true&page=1&tags%5B%5D=langchain)
