5 ms·
AIQuery: Interact with your database using natural language processing(Chat-GPT)
- Joangel 4y agoAIQuery is a powerful TypeScript library that simplifies the process of interacting with a MongoDB database by allowing users to make advanced queries using natural language text. It utilizes the OpenAI GPT-3 model by default to generate executable TypeScript code based on the given query, roles, schemas, and database type, allowing for flexible and dynamic database interactions.
- rf15 4y agoI wonder how you can prevent the usual pitfalls of completely made up nonfunctional code AIs can produce for systems like this. I'd also like to see more complex examples that includes more advanced query features.
- Joangel 4y agoIt's an experimental package, its still in the first version so i am testing it out and making improvements. I use prompt engineering to avoid non functional codes and give the best result for the code that it will execute, but i am implementing another feature that will verify the code logic, fix if is there any issue and improve it. I have tested it out with some advanced queries and it works, but it's experimental, we shouldn't use it un production until we test the results of it, but it works nicely for almost all type of requirements.