Introduction
However, retrieving precise and relevant information from this vast repository remains a challenge, especially when the need is to combine document retrieval with intelligent AI-driven insights.
This is where Retrieval-Augmented Generation (RAG) comes into play. RAG pipelines blend the strengths of retrieval systems with generative AI models, enabling users to extract relevant information and generate context-aware responses seamlessly. While building such a system traditionally involves complex coding, integrating APIs, and managing infrastructure, what if you could achieve all this without writing a single line of code?
The objective of this blog is to guide you through setting up a RAG pipeline for documents stored in Google Drive. We’ll explore how Dataworkz can simplify the process, from indexing your documents to enabling advanced natural language queries. Along the way, we’ll address challenges such as handling unstructured data and ensuring data privacy—all without requiring any technical expertise.
Whether you’re a business owner looking to improve team productivity or an individual aiming to harness the power of AI for personal use, this blog will equip you with the tools and knowledge to unlock the potential of your Google Drive documents effortlessly. Let’s dive in!
What is a RAG Pipeline?
In the age of AI, ensuring accurate information from Large Language Models (LLMs) is critical, especially when the trust of the customer is on the line. When AI-generated responses are used to answer queries, even a single misstep can lead to a loss of confidence in your business. That’s why it’s crucial to minimize hallucinations in your AI applications.
The most effective approach to achieve this is through Retrieval-Augmented Generation (RAG) systems. These systems can help ensure that LLMs stay on track by providing context and accurate reference points, reducing the risk of generating misleading or false information. Even if you have trained a private model on your date, RAG will still be required for the most optimal results. Why you may ask? Mainly when adding new data to the knowledge base, retraining the SLM every time new data is added incurs cost and takes time. When you have an existing RAG pipeline, new data can be added to your knowledge base and is immediately in production.
Challenges
Typically to build a RAG pipeline user would have to implement the following programmatically:
- Google Drive access: Way to connect to google drive and to get documents to process (PDFs, Word files, or text files). This typically would require Google SSO or Service Account integration. This has to be done in a manner to expose only the necessary documents to developers on system rather than everything accessible to the individual configuring the same
- Chunking : Choosing the correct chunking strategy for indexation is critical for getting effective responses. While larger chunk size is likely to encompass all necessary information within the top chunks, it is going to slow down the response generation time. Right chunk overlap ensures that there isn’t loss of information due to splitting between chunks
- Indexing/Vectorization : this requires picking an appropriate embedding model and indexing the same in vector database like MongoDB or Pinecone
- Using LLM services (e.g., OpenAI, Llama or Hugging Face) to answer questions
All of the above requires using multiple tools and writing a lot of code to build the RAG pipeline.
Building the RAG Pipeline using Dataworkz
Dataworkz simplifies the entire process by letting users build the entire RAG pipeline using UI in a matter of a few minutes without writing any piece of code. It abstracts the complexity involved in building the same, keeping secure access in mind and addressing all the challenges that are discussed in the previous section.
Google Drive Security & Best Practices
The way documents are accessed by various products has huge security implications. Post authorization letting users browse through the drive could be a recipe for disaster. Users in such a case could potentially navigate to unintended folders exposing sensitive documents. Dataworkz ensures that the user gets access to only an intended folder and documents contained within the same folder.
Additionally users can follow certain best practices preventing unintended access –
- Create a separate Google account for storing documents that will be used to build an AI application powered by RAG. This ensures that only the data corpus for RAG is accessible to any user of Dataworkz RAG builder.
Create a Dataworkz Account
You need to have a Dataworkz account. If you already have an account you can directly jump to the next step, else goto https://ragapps.dataworkz.com/.

Register with either Google SSO or create an account with your email address by clicking Create Account link . For details refer https://docs.dataworkz.com/product-docs/guides/user-management
Login & Start building AI app
Login to https://ragapps.dataworkz.com/.

Connect to Google Drive
- Click the Configuration (wheel icon) at the top right of the screen
- Select SaaS Applications -> Google Drive from the left menu

- It will open the below screen. Click + icon to add connector to Google Drive

- It will pop up a screen to configure connector for Google Drive

- Enter name for connector
- Select the OAuth option
- Dataworkz OAuth – for using OAuth
- Service Account – for using Google Service Account
- In this blog we are going to use the OAuth example so sign-in with Google and authorize Dataworkz to access the files in the specified folder.
- Drive path – folder URL that contains the required documents. Only documents in the specified folder can be viewed for processing during RAG pipeline creation
- Click “Save” to save the configuration
- Click “AI Applications” from the top menu to go back to the homepage
Security for Google Drive documents
Dataworkz ensures that the users get access to only an intended folder and documents contained within the same folder. This is evident from the configuration section above where a specific folder path is taken as input instead of access to the entire drive.
Configure LLM
- Click the “LLM Configuration” link on the right panel to open the LLM configuration screen

- Click the + icon to add a new LLM Configuration.

- Enter the following details.
- Type: Choose between Generative or Extractive.
- Deployment Type: Select from OpenAI, AzureOpenAI, Hosted, VertexAI, AnyScale, Hugging Face, or AWS Bedrock.
- Model: Specify the language model from your chosen deployment type.
- Name: Name your model.
- For non-OpenAI language models (other than Bedrock)
- URL: provide the URL.
- API Key: Provide the API key for the language model (other than Bedrock)
- For Bedrock, enter AWS region, key and secret
- Temperature : LLM temperature
- Max Response Length
- Click “Save” button to save the LLM configuration

- Click “AI Applications” link to go back

Ingest the Documents
Ingestion process lets you browse for the required documents in Google Drive and allows Dataworkz to pre-process the same by default.
- Click “Create” button on the AI Applications page

- Give a name for the AI application and select the LLM Configuration of choice.
- Click “Next” button

- Select “Ingest New Dataset” unless ingestion was previously done and click “Continue”

- Select the file type (PDF as an example for this blog)
- Select the datasource from the dropdown. You will see the google drive connector that was configured in the previous step. Select the same and further select the folder containing the required documents, and then click “View files” link

- Select the required document from the list (Apple 10 K for this usecase) and click “Save”

- Review the information regarding the source of the ingestion and Target (populated by default). Click “Next”
- This completes the ingestion configuration and takes user to the “Chunk & Vectorize” section
Chunk & Vectorize
Indexing allows efficient retrieval of relevant data. You can use libraries like all-mpnet-base-v2 to generate embeddings and store the same in a vector database like MongoDb or Pinecone.

The chunk & vectorize configuration is defined in default mode by Dataworkz. Defaults used are the following
- Chunk size – 2000
- Chunk overlap – 300
- Embedding model – all-mpnet-base-v2
- Target dataset – a collection in MongoDb vector DB
This configuration is fully customizable however for the purpose of this blog focus would be on building the RAG pipeline quickly in default mode.
Click “Next” button to move to the next step of Retrieval
Retrieval

Retrieval strategy is also auto configured by Dataworkz. Users could choose to edit any of these or add to the RAG pipeline from the left menu or click “Review and Submit” to move to the next step.

Review the information and click “Submit”. This step would complete creation of the AI application RAG pipeline for Apple 10 K document. Created applications can be seen in the list of applications.

The application’s deployment progress is displayed on the screen all the way from ingestion to retrieval. Once each stage is “Complete”, the application is ready for Q&A.
Try out few questions
Click the search icon below the “Action” column. This would pop the Q&A screen.

Ask any question related to the content and click the “Ask” button to get the response. For e.g. ask a question like “What was Apple revenue in 2022?”

At the right of the screen are the links to the source from which the response got generated. Click the same to see the details.
Additional information regarding performance of various stages of the response generation can be viewed by clicking on the “View probe data” link.

Conclusion
Organizations have a strong need to build Q&A on top of sources like Google Drive to drive productivity. Building a RAG pipeline on the same involves significant complexities and development effort. Dataworkz platform abstracts this complexity and lets you build the same in a matter of minutes without writing a single line of code. This can speed up creation and deployment of RAG pipelines, saving significant engineering time.