Hi Pankaj,
we published this How To to guide users on how to load Mendix application data into a knowledge base. Especially section 2.4 focuses on how to add data chunks from within a Mendix application to a knowledge base. The How to has been written for the Mendix Cloud GenAI connector but is similarly applicable when using a pgVector instead of a Mendix Cloud Knowledge base as the required operations either come from GenAICommons module or are very similar:
- Chunks: Initialize ChunkCollection (GenAICommons)
- Chunks: Add KnowledgeBaseChunk to ChunkCollection (GenAICommons)
- Connection: Get (pgVector Connector)
- Embed & Repopulate Connection -> use Generate Embeddings (ChunkCollection) (GenAICommons) + Repopulate KB (pgVector) instead.
You can also check the Ticket_CreateEmbeddingsAndStore microflow inside of the GenAIShowcase app for an implementation example. Here, tickets created from within the showcase are being added to a knowledge base.
Good success and let us know if you have more questions!
Hi Pankaj,
please excuse me being not precise enough when talking about pgVector: Have you already seen this module? It contains its own 'Connection: Get' operation and works without Mendix Cloud GenAI and you also do not need the External Database Connector for it.
Regarding your latter question: If there is a criteria to decide whether the response has been found with RAG or not, you can just add a decision to your microflow and continue your microflow with sending a new request to OpenAI. Is this an option in your case? Thanks to the GenAICommons module, you can usually even continue with your previously created Request object.
With kind regards,
Lina Fischer
Thanks, Lina, for your great help.
Currently, I’m stuck with an issue: Connection:get
for the PGVector variable is not available. Also, I’m unable to retrieve data from the PGVector database because it is persistable and cannot be retrieved directly.
Additionally, in the Mendix documentation here: https://docs.mendix.com/appstore/modules/genai/how-to/howto-groundllm/#loading-data-into-the-knowledge-base, it’s not clear where to call the created microflow and how to populate it. These steps are not mentioned in the document.
I’m attaching screenshots of where exactly I’m stuck,
If possible, please share the steps for this Or kindly correct me if I’m doing something wrong. — it would be a great help for us.