Skip to content

Add AI-powered search to find conversations by meaning, not just keywords.#10

Open
tthippareddy1 wants to merge 3 commits intoTechX-Resources:mainfrom
tthippareddy1:main
Open

Add AI-powered search to find conversations by meaning, not just keywords.#10
tthippareddy1 wants to merge 3 commits intoTechX-Resources:mainfrom
tthippareddy1:main

Conversation

@tthippareddy1
Copy link

Hi, I built a semantic search feature for AIArchives. Instead of just searching by tags or keywords, users can now search by meaning.

For example, searching "React state management" will find conversations about useState, Redux, Zustand etc. even if those exact words aren't used.

What I added:

  • /api/search endpoint that takes a query and returns relevant conversations
  • Search page at /search with a clean UI
  • pgvector extension for storing vector embeddings in PostgreSQL
  • OpenAI embeddings (text-embedding-3-small) to convert text to vectors
  • A script to backfill embeddings for existing conversations
  • Database migration to add the embedding column

How to test:

  1. Run the migration: 002_add_embeddings.sql
  2. Set OPENAI_API_KEY in your .env
  3. Run npm run generate-embeddings to generate embeddings for existing conversations
  4. Go to /search and try searching for anything

Let me know if you want any changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant