# Building a Multi-User Chatbot with Langchain and Pinecone in Next.JS

**URL:** <https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898>\
**Category:** General\
**Created:** [March 24, 2023, 9:44pm UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898 "2023-03-24T21:44:32Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![HermeticJay](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/hermeticjay/32/474_2.png) [@HermeticJay](https://community.pinecone.io/u/HermeticJay)\
**Post date:** [May 16, 2023, 11:19pm UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898/23 "2023-05-16T23:19:04Z")

</div>

I’ve gotten zero response on this, which ultimately led me to explore other solutions like Weaviate. If someone from Pinecone can chime on how to make this work, that would be great, because I would really like to hop on the Pinecone train, however it seems I can’t even get past the turnstile. When I run into progress-stopping errors like this with code literally copy-and-pasted from a partner website, and no response from their team, it makes me question how stable things are and if I should invest some more time. Maybe it’s just early though and with time it will get all smoothed out. I’m staying hopeful for now.

---

<div class="post-metadata">

**Author:** ![Sean](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/sean/32/543_2.png) [@Sean](https://community.pinecone.io/u/Sean)\
**Post date:** [May 17, 2023, 5:00pm UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898/24 "2023-05-17T17:00:11Z")

</div>

Anyone here interested in collaborating on a fork of the [GitHub - Azure-Samples/azure-search-openai-demo: A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.](https://github.com/Azure-Samples/azure-search-openai-demo/) project that Microsoft released (it’s a pretty good chatbot UX) to adapt it to use Pinecone instead of Azure Cognitive Search?  
I’ve got the data chunking into pinecone, but I’m not getting the best query results (cognitive search is way better). I’d like to better understand the best course of action for either word or sentence embedding:

1. For the Azure Demo’s PDFs, should I use their model (insert page by page of text), or perhaps should I use a smaller chunk of data for perhaps less loss from the **all-MiniLM-L6-v2** limit of 256 tokens?
2. Should I consider using another model? Perhaps even switching to Word Vector like Word2Vec at the loss of semantics?
3. What is the best model to capture OOV (out of vocab) data?
4. Do SentenceTransformers keep the OOV words, or do they discard them?
5. Would it make sense to override **all-MiniLM-L6-v2** ’s max\_seq\_length to perhaps 512, thereby almost guaranteeing 300-400 words won’t lose information due to model truncation?

Let me know!

Thanks,

Sean

---

<div class="post-metadata">

**Author:** ![damianesteban](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/damianesteban/32/840_2.png) [@damianesteban](https://community.pinecone.io/u/damianesteban)\
**Post date:** [June 23, 2023, 12:06am UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898/25 "2023-06-23T00:06:30Z")

</div>

Do you still plan on working on this?

---

<div class="post-metadata">

**Author:** ![jechkov.dmitriy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jechkov.dmitriy/32/853_2.png) [@jechkov.dmitriy](https://community.pinecone.io/u/jechkov.dmitriy)\
**Post date:** [June 23, 2023, 7:42pm UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898/26 "2023-06-23T19:42:12Z")

</div>

Hello ! Thank you for sharing the code ! Where in the code you specify the list of URLs to chat with?

---

<div class="post-metadata">

**Author:** ![jeremy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jeremy/32/1020_2.png) [@jeremy](https://community.pinecone.io/u/jeremy)\
**Post date:** [July 11, 2023, 6:37pm UTC](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898/27 "2023-07-11T18:37:46Z")

</div>

I had the same issue, but found that I was using an access token instead of an API token. Once I created an Ably App, I was given an API token and that resolved the error.

[Previous page](https://community.pinecone.io/t/building-a-multi-user-chatbot-with-langchain-and-pinecone-in-next-js/898.md?page=1)
