Prateek D
Prateek D

Reputation: 1

I need help using Replit

If Replit itself does NOT have built-in vector search, AI response, or RAG, does it have the capability to connect to these services? If yes, does this mean that Replit CAN function like an AI-driven no-code platform where you can build anything with natural language prompts — As long as it’s connected to the right external tools?

Basically, following are my main questions:

  1. The efficency of these external connections/integrations wehn building with Replit and
  2. The capability of handling any of these aforementioned external tools or tech stack just thru prompts when building thru Replit

For example:

  1. Can Replit handle vector search with natural language prompts only, if connected to Pinecone/FAISS?
  2. Can Replit fetch real-time search results via prompts only, If connected to SERP APIs?

So far, it feels inefficent when trying to connect APIs of even simpler integration like Open AI Api key thru prompts to make it work.

Upvotes: -2

Views: 34

Answers (1)

the potgres database supports pgvector - you can enable it and then store and query verctors in the neon database.

here is an overview of the sql

CREATE EXTENSION pgvector;

SELECT * FROM pg_extension WHERE extname = 'vector';

CREATE TABLE embeddings (
    id SERIAL PRIMARY KEY,
    embedding vector(1536)  -- Replace 1536 with your vector dimension
);

INSERT INTO embeddings (embedding) VALUES ('[0.1, 0.2, 0.3, ..., 0.9]');

SELECT id, embedding <=> '[0.1, 0.2, 0.3, ..., 0.9]' AS distance
FROM embeddings
ORDER BY distance ASC
LIMIT 5;

note the ... is to shortend the embeddings, they are 1536 long! Once you have the vector extension installed you'll be good to go.

Upvotes: -1

Related Questions