← Open Source
dabit3

semantic-search-nextjs-pinecone-langchain-chatgpt

Embeds text files into vectors, stores them on Pinecone, and enables semantic search using GPT3 and Langchain in a Next.js UI.

TutorialsAIE roadmapTypeScript
Open on GitHub
Momentum
+0stars in 24 hours0.0%
761
Stars
106
Forks
+0
This week
2
Contributors
Created 2023-05-28 · Updated 2026-10-06 · #14108 today
Top developers

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt is ranked 14,108 with 761 stars.

Same-category comparison

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt is ranked 14,108 among these 8 peers; anujvyas/Machine-Learning-Projects is ranked 14,097.

Same-category comparison
NameRankMetrics
trekhleb/self-parking-car-evolution14,060
Language:
TypeScript
Stars:
766
Forks:
87
Description:
🧬 Training the car to do self-parking using a genetic algorithm.
BenjiKCF/Neural-Net-with-Financial-Time-Series-Data14,061
Language:
Jupyter Notebook
Stars:
765
Forks:
303
Description:
This solution presents an accessible, non-trivial example of machine learning (Deep learning) with financial time series using TensorFlow.
huangjia2019/langchain-in-action14,083
Language:
Python
Stars:
763
Forks:
263
Description:
Practical LangChain patterns and implementations for real-world LLM applications.
anujvyas/Machine-Learning-Projects14,097
Language:
Jupyter Notebook
Stars:
762
Forks:
141
Description:
This repository consists of all my Machine Learning Projects.
udacity/CVND_Exercises14,122
Language:
Jupyter Notebook
Stars:
760
Forks:
669
Description:
Exercise notebooks for CVND.
felipessalvatore/self_driving_pi_car14,159
Language:
Python
Stars:
756
Forks:
74
Description:
A deep neural network based self-driving car, that combines Lego Mindstorms NXT with the computational power of a Raspberry Pi 3.
OpenZeppelin/damn-vulnerable-defi14,168
Language:
Solidity
Stars:
755
Forks:
1,492
chris-chris/pysc2-examples14,172
Language:
Python
Stars:
755
Forks:
346
Description:
StarCraft II - pysc2 Deep Reinforcement Learning Examples.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageTypeScript
CategoryTutorials
SubcategoryAIE roadmap
KeywordsRAG
Stars761
Forks106
Contributors2
Created date2023-05-28
Updated date2026-10-06
Stars in 1 day0
Stars in 7 days0
Rank14,108
Previous rank13,979
Rank change-129
7-day stars rank14,296
Previous 7-day stars rank14,311
7-day stars rank change15
Total stars rank13,913
Previous total stars rank13,890
Total stars rank change-23
CountryUSA
README summary

js - Full Stack Starter This is a basic starter project for building with the following tools and APIs: Next. js LangchainJS Pineceone Vector Database GPT3 When I started diving into all of this, I felt while I understood some of the individual pieces, it was hard to piece together everything into a cohesive project. I hope this project is useful for anyone looking to build with this stack, and just needing something to start with. What we're building We are

building an app that takes text (text files), embeds them into vectors, stores them into Pinecone, and allows semantic searching of the data. For anyone wondering what Semantic search is, here is an overview (taken directly from ChatGPT4): __Semantic search refers to a search approach that understands the user's intent and the contextual meaning of search queries, instead of merely matching keywords. __ __It uses natural language processing and machine learning to interpret the semantics, or meaning, behind queries. This results

in more accurate and relevant search results. Semantic search can consider user intent, query context, synonym recognition, and natural language understanding. Its applications range from web search engines to personalized recommendation systems. __ Running the app In this section I will walk you through how to deploy and run this app. Prerequisites To run this app, you need the following: 1. Pinecone API Key Up and running To run the app locally, follow these steps: 1. Change into the directory and

install the dependencies using either NPM or Yarn 3. Copy to a new file called and update with your API keys and environment. (Optional) - Add your own custom text or markdown files into the folder. Run the app: Need to know When creating the embeddings and the index, it can take up to 2-4 minutes for the index to fully initialize. There is a settimeout function of 180 seconds in the that waits for the index to be created

. If the initialization takes longer, then it will fail the first time you try to create the embeddings. If this happens, visit the Pinecone console to watch and wait for the status of your index being created to finish, then run the function again. Running a query __The pre-configured app data is about the Lens protocol developer documentation, so it will only understand questions about it unless you replace it with your own data. Here are a couple of

questions you might ask it with the default data__ 1. What is the difference between Lens and traditional social platforms 2. What is the difference between the Lens SDK and the Lens API 3. The base of this project was guided by this Node. js tutorial, with some restructuring and ported over to Next. You can also follow them here on Twitter! Getting your data I recommend checking out GPT Repository Loader which makes it simple to turn any GitHub

repo into a text format, preserving the structure of the files and file contents, making it easy to chop up

Frequently asked questions

How many stars and forks are recorded?

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt has 761 stars and 106 forks.

What is the repository rank?

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt is ranked 14,108.

What language and category are recorded?

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt has 761 stars, uses TypeScript and belongs to Tutorials.

Which repository is closest in rank?

dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt is compared with anujvyas/Machine-Learning-Projects, ranked 14,097 with 762 stars.

README

Langchain, Pinecone, and GPT with Next.js - Full Stack Starter

This is a basic starter project for building with the following tools and APIs:

  • Next.js
  • LangchainJS
  • Pineceone Vector Database
  • GPT3

When I started diving into all of this, I felt while I understood some of the individual pieces, it was hard to piece together everything into a cohesive project. I hope this project is useful for anyone looking to build with this stack, and just needing something to start with.

What we're building

We are building an app that takes text (text files), embeds them into vectors, stores them into Pinecone, and allows semantic searching of the data.

For anyone wondering what Semantic search is, here is an overview (taken directly from ChatGPT4):

Semantic search refers to a search approach that understands the user's intent and the contextual meaning of search queries, instead of merely matching keywords.

It uses natural language processing and machine learning to interpret the semantics, or meaning, behind queries. This results in more accurate and relevant search results. Semantic search can consider user intent, query context, synonym recognition, and natural language understanding. Its applications range from web search engines to personalized recommendation systems.

Running the app

In this section I will walk you through how to deploy and run this app.

Prerequisites

To run this app, you need the following:

  1. An OpenAI API key
  2. Pinecone API Key

Up and running

To run the app locally, follow these steps:

  1. Clone this repo
git clone git@github.com:dabit3/semantic-search-nextjs-pinecone-langchain-chatgpt.git
  1. Change into the directory and install the dependencies using either NPM or Yarn

  2. Copy .example.env.local to a new file called .env.local and update with your API keys and environment.

    Be sure your environment is an actual environment given to you by Pinecone, like us-west4-gcp-free

  3. (Optional) - Add your own custom text or markdown files into the /documents folder.

  4. Run the app:

npm run dev

Need to know

When creating the embeddings and the index, it can take up to 2-4 minutes for the index to fully initialize. There is a settimeout function of 180 seconds in the utils that waits for the index to be created.

If the initialization takes longer, then it will fail the first time you try to create the embeddings. If this happens, visit the Pinecone console to watch and wait for the status of your index being created to finish, then run the function again.

Running a query

The pre-configured app data is about the Lens protocol developer documentation, so it will only understand questions about it unless you replace it with your own data. Here are a couple of questions you might ask it with the default data

  1. What is the difference between Lens and traditional social platforms
  2. What is the difference between the Lens SDK and the Lens API
  3. How to query Lens data in bulk?

The base of this project was guided by this Node.js tutorial, with some restructuring and ported over to Next.js. You can also follow them here on Twitter!

Getting your data

I recommend checking out GPT Repository Loader which makes it simple to turn any GitHub repo into a text format, preserving the structure of the files and file contents, making it easy to chop up and save into pinecone using my codebase.

Nearby in the ranking
Similar items