Creating Retrieval Augmented Generation applications with Pinecone, OpenAI, and Dataworkz
While the concept of creating Retrieval Augmented Generation (RAG) products using proprietary data is incredibly promising, the reality can be quite challenging. Developers often find themselves spending countless hours integrating various tools to build even semi-functional applications.
The real hurdles emerge when it’s time to scale. Imagine needing to develop 50 applications that each interact with thousands of datasets and files. In such scenarios, having a user-friendly, highly customizable platform that requires no coding becomes invaluable. Dataworkz empowers users to seamlessly create and manage their applications, enabling them to focus on innovation rather than integration. With this approach, businesses can harness the full potential of their data with ease, ensuring they remain agile and competitive in a rapidly evolving market.
First, we’ll connect to our language model using the OpenAI API token. Next, we’ll configure the connection to our vector database with Pinecone. Both steps are straightforward and require just the respective API tokens from OpenAI and Pinecone. Click the highlighted configuration buttons to navigate to the respective configuration screens.
OpenAI Connection:
Enter the language model, give it a name, add your API token and enter the desired variables
Pinecone database connection:
Give your pinecone connection a name and add the pinecone API token which can be found in your pinecone account under the API page. Save both of these and move on to creating the AI application of your choice.
Back on the main AI Application page, we can hit ‘Create AI App’
We will first be prompted to give our application a name, followed by selecting the language model or models of your choice. Here we have selected gpt 3.5 turbo and GPT 4.
Hit next to move to the ingestion section where we can choose the files that we want to use for the RAG component of our application.
Since we want to ingest new data, we will select the ‘ingest new data’ option, which will allow us to upload pdfs, word docs, sharepoint, as well as crawling websites.
In this example, we choose to upload pdf files from an S3 bucket, but you may also upload from GCS and Azure.
After hitting save, you will see that the target dataset is automatically mapped based on the name of the ai application. If you would like to change this, hit the edit pencil icon next to the Target box.
When we click ‘Next,’ we’ll proceed to the screen where we can chunk and embed our vectors in Pinecone. We select the ‘pinecone_ada_002’ workflow, add our Pinecone instance and index name, and create a new namespace. For chunk storage, we choose MongoDB where we also keep record of the PDF file names and vector IDs. Doing this ensures we can properly retrieve the source documents and provide the context to the LLM.
Save our vector storage configuration, and move on to the retrieval review. Here we make sure that we have all of the configuration components we want. If you want to edit the prompt, language models we are using, or query retrieval type hit the edit pencil buttons above the green icons. When ready, hit submit.
If you look in pinecone, you will see your namespace with the vectors created for the uploaded documents.
Once this is complete, you will see the application is ready for asking questions. Hit the search button to search your knowledge base. 
Ask questions related to the documentation that has been uploaded, and retrieve a generated response along with the source attribution.
The integration of Pinecone, OpenAI, and Dataworkz provides a streamlined pathway for developing Retrieval Augmented Generation applications without the need for extensive coding knowledge. By simplifying the connection and configuration processes, Dataworkz enables users to focus on harnessing their data’s potential rather than getting bogged down in technical complexities.
With just a few straightforward steps—connecting to your language model, setting up your vector database, and ingesting data—you can create powerful AI applications tailored to your specific needs. As you scale and manage multiple datasets, the ease of use offered by this platform becomes invaluable, allowing for rapid innovation in a competitive landscape.
By utilizing these tools effectively, businesses can not only enhance their operational agility but also ensure they are well-equipped to leverage their proprietary data for insightful decision-making and improved customer engagement. As you embark on your journey to build impactful RAG applications, remember that with Dataworkz, the power of AI and data is at your fingertips, ready to drive your success in the digital age.