Inspiration

I am interested in AI generative to help analyze and search on own data. I have learnt few weeks ago a solution based on OpenAI, Langchain and LlamaIndex with Python. But I have discovered that MongoDb proposes Atlas Search + OpenAI approach. Hence I have decided to showcase the usage of MongoDb Atlas with Google Apigee Reverse Proxy Tool as modern API management for this challenge

What it does

It helps to search for Data stored in MongoDb Atlas with generative AI approach.

How we built it

  • I have created a free tier cluster, database on MongoDb Atlas, configured Atlas Database Trigger to generate OpenAI embeddings, then use sample database 'sample_mflix' to work with Movies collection.

  • I have developed Node JS search API (GET /movies GET /movies/:thematic POST /query with input as body param ) to test the MongoDB Atlas Database connexion and deployed it on Render.com to enable public query on the MongoDb Atlas database.

  • I have activated Reverse Proxy on Google Apigee acting as "Facade" to enable Public Access for search backend API service. This will allow more flexible, scalable and secure API management.

Challenges we ran into

  • Apigee Provisioning for Internal Access Routing proposes to create a VM. Unfortunately, my project account does not allow to create the VM, hence I had to delete Apigee instance/environment/environmentGroup and restarts the provisioning with external Access Routing.

  • Apigee Proxy Failure "Unsupported Encoding br protocol.http.UnsupportedEncoding" due to content-encoding issue => fixed by forcing content-encoding not to include br with Preflow setting

  • Browser Failure "Unsupported Encoding br protocol.http.UnsupportedEncoding" due to content-encoding issue => fixed by deploying/activating plugin like ModHeader on Chrome and setting Accept-encoding header value with "gzip,deflate" (without br)

Accomplishments that we're proud of

  • Mnimum Viable Product (MVP) of an application interacting with Node JS backend, which performs search/query on MongoDb Atlas database using some AI generative approach, thru Apigee reverse proxy

What we learned

  • MongoDb Atlas special features : Search, Trigger, App Service for Values/Secrets

  • Google Apigee Reverse Proxy Tool connected with Public Target Endpoint, combined with Preflow setting to fix unsupported encoding "br" issue

What's next for lorciedatabot

  • freemium version for features such as hosting.

  • adapt, load and test different custom database

Disclaimer : Due to the current free plan hosting, the backend web service may not be up sometimes, requiring to restart it manually.

Built With

Share this project:

Updates