Convex Rag Component
Hi All,
Im new to using convex rag. I was wondering if "await rag.delete(ctx, { entryId: entry.entryId });" is supposed to delete the vector embeddings alongside the chunks, content, and the entry it makes for a specific document you run it on.
This is my rag.ts init:
export const rag = new RAG(components.rag, {
textEmbeddingModel: openai.embedding("text-embedding-3-small"),
embeddingDimension: 1536,
});
Let me know if you need more context, thanks!
7 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
It is my understanding it will delete the embeddings, no reason to keep them.
Interesting ampp, on my end it is not. It is just deleting everything other than the embeddings in the vectors_1536 table.
I confirmed I am using latest convex and rag component.
I just checked my db rn, the embeddings are still there.
Really weird.
sorry @Zaid I missed this - it gets deleted when you replace an entry, but not when you delete explicitly. That's a bug - can you see if it's fixed on the latest alpha?
No worries Ian, thanks for your response!
Not at my PC atm, will check when I can!
And @ampp thanks for jumping in - I'm throwing in which I believe you wanted - that was someone else actually
deleteByKey
while I'm in this code, Tested the latest alpha of RAG, it’s fixed. Amazing work!