Dhruv Kumar Jha
Dhruv Kumar Jha
CCConvex Community
Created by Dhruv Kumar Jha on 5/29/2024 in #support-community
Can we customize the convex public/deployment url?
If yes, how? Are there any docs/tutorial for this?
12 replies
CCConvex Community
Created by Dhruv Kumar Jha on 4/28/2024 in #support-community
Getting Best Representation Vectors - Summarizing Large Documents
I am following one of the examples listed here https://github.com/gkamradt/langchain-tutorials/blob/main/data_generation/5%20Levels%20Of%20Summarization%20-%20Novice%20To%20Expert.ipynb "Level 4: Best Representation Vectors - Summarize an entire book" It's about summarizing large documents/books etc and while there are lot of methods, I want to test "Level 4" I am stuck at steps 4 & 5 Step 4 => Cluster the vectors to see which are similar to each other and likely talk about the same parts of the book Step 5 => Pick embeddings that represent the cluster the most (method: closest to each cluster centroid) So assuming I have already loaded all the docks, splitted them into chunks and created embeddings for them. Reading the docs, I know how to query the vector database but I don't know how to cluster the vectors and how to pick vectors closest to cluster centroid Can anyone help me with this? Are there any docs related to this? do we have any alternatives for node js/convex?
2 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/15/2024 in #support-community
Using Google Vertex AI in Actions
NOTE: I haven't tested anything yet but seems like this is not possible. I want to use Google Vertex AI embeddings model with langchain https://js.langchain.com/docs/integrations/text_embedding/google_vertex_ai But the documentation says
You are logged into an account (using gcloud auth application-default login) permitted to that project.
You are logged into an account (using gcloud auth application-default login) permitted to that project.
I don't know how this will work with the Serverless architecture Convex provides. While current scenario is only for Google, other APIs/SDKs might have similar dependencies, Any tips on this?
2 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/11/2024 in #support-community
Can Ents reference internal tables
I am following the documentation here https://labs.convex.dev/convex-ents/schema My query is can we reference internal tables, like _storage as edges? EXAMPLE:
files: defineEnt({
name: v.string(),
extension: v.string(),
}).edge("_storage"),
files: defineEnt({
name: v.string(),
extension: v.string(),
}).edge("_storage"),
3 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/9/2024 in #support-community
Pricing for Vector storage and bandwidth
Pricing for vector storage and bandwidth is not clear to me, It would be helpful if anyone can provide any assistance. NOTE: this is just an example to help me understand pricing better, you're welcome to correct me. Also, please do not take into consideration what convex includes in their pricing tier, consider these are additional usage Consider this example: I have a document with 1000 pages and each page has 500 words. Vector Dimension: 1536 Total words = 1000 * 500 => 500000 words in total Now I want to store the embeddings in vector database I convert each page into 10 chunks => 10 chunks * 1000 pages => 10,000 vector db records (only embeddings and ids of related tables (3) fields, not storing texts here) Since 1 page has 500 words, Let's assume each chunk contains 500/10 => 50 words => approx 70 tokens. Question: How much would it cost me in vector storage for these 1000 pages? --- Now let's start querying the vector db, I query vector database 1000 times with my embeddings, And I request 10 results per query. Question: How much would it cost in bandwidth for 1000 queries with 10 result per query? Also, I love the flexibility Convex offers and I want to use it but would it be ideal for SaaS RAG application? If I have 1000 users uploading 1000 pages each and querying vector store 1000 times in a month - how much would it cost me?
2 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/8/2024 in #support-community
Unable to delete empty, unused collection
In my schema file I had specified a collection and later I changes the collection name, it works., In my Convex dashboard I can see both the collections (empty for now) I tried to delete the collection I am not using, but it threw error "Failed to insert or update a document in table "COLLECTION_NAME" because it does not match the schema: Table "COLLECTION_NAME" that appears in schema must exist" Ok, I added the collection back in schema file and then tried to delete it, In this case I got error saying (not exact): Collection exists in schema file, I cannot delete it, First I need to remvoe the collection from schema file. Now, you see the condition issue I am running into? TLDR; To delete a collection I have to remove it from my schema file AND to delete a collection, that collection must be present in the schema file.
4 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/5/2024 in #support-community
How to store multiple documents in DB at once
I am going through the docs here https://docs.convex.dev/database/writing-data I can see db.insert method to insert new record, But I can't see any methods for storing multiple records at once. Is this even possible?
2 replies
CCConvex Community
Created by Dhruv Kumar Jha on 3/3/2024 in #support-community
Actions in sub directory?
I created a new directory within convex and created a new file named automation.ts within that dir, I see no errors when running npx convex dev however I can't see that action/function in the convex dashboard (I can see all other functions which are present in the root of convex dir) Example path /app/convex/integrations/automation.ts I can't seem to find the docs for this, I remember seeing it somewhere and am positive this can be done., Can anyone refer me to docs/videos related to this? or am I hallucinating?
2 replies
CCConvex Community
Created by Dhruv Kumar Jha on 2/25/2024 in #support-community
Trigger functions on database record insert or file uploads/changes?
Is there any way to trigger functions automatically when a record is inserted or updated in database or if a new file is uploaded? Any link to the docs/tutorials on this would be helpful.
3 replies