sariskiat commited on
Commit
f3f2a37
·
verified ·
1 Parent(s): fae99ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -125
README.md CHANGED
@@ -1,125 +1,13 @@
1
- # Vertex AI RAG Agent with ADK
2
-
3
- This repository contains a Google Agent Development Kit (ADK) implementation of a Retrieval Augmented Generation (RAG) agent using Google Cloud Vertex AI.
4
-
5
- ## Overview
6
-
7
- The Vertex AI RAG Agent allows you to:
8
-
9
- - Query document corpora with natural language questions
10
- - List available document corpora
11
- - Create new document corpora
12
- - Add new documents to existing corpora
13
- - Get detailed information about specific corpora
14
- - Delete corpora when they're no longer needed
15
-
16
- ## Prerequisites
17
-
18
- - A Google Cloud account with billing enabled
19
- - A Google Cloud project with the Vertex AI API enabled
20
- - Appropriate access to create and manage Vertex AI resources
21
- - Python 3.9+ environment
22
-
23
- ## Setting Up Google Cloud Authentication
24
-
25
- Before running the agent, you need to set up authentication with Google Cloud:
26
-
27
- 1. **Install Google Cloud CLI**:
28
- - Visit [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) for installation instructions for your OS
29
-
30
- 2. **Initialize the Google Cloud CLI**:
31
- ```bash
32
- gcloud init
33
- ```
34
- This will guide you through logging in and selecting your project.
35
-
36
- 3. **Set up Application Default Credentials**:
37
- ```bash
38
- gcloud auth application-default login
39
- ```
40
- This will open a browser window for authentication and store credentials in:
41
- `~/.config/gcloud/application_default_credentials.json`
42
-
43
- 4. **Verify Authentication**:
44
- ```bash
45
- gcloud auth list
46
- gcloud config list
47
- ```
48
-
49
- 5. **Enable Required APIs** (if not already enabled):
50
- ```bash
51
- gcloud services enable aiplatform.googleapis.com
52
- ```
53
-
54
- ## Installation
55
-
56
- 1. **Set up a virtual environment**:
57
- ```bash
58
- python -m venv .venv
59
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
60
- ```
61
-
62
- 2. **Install Dependencies**:
63
- ```bash
64
- pip install -r requirements.txt
65
- ```
66
-
67
- ## Using the Agent
68
-
69
- The agent provides the following functionality through its tools:
70
-
71
- ### 1. Query Documents
72
- Allows you to ask questions and get answers from your document corpus:
73
- - Automatically retrieves relevant information from the specified corpus
74
- - Generates informative responses based on the retrieved content
75
-
76
- ### 2. List Corpora
77
- Shows all available document corpora in your project:
78
- - Displays corpus names and basic information
79
- - Helps you understand what data collections are available
80
-
81
- ### 3. Create Corpus
82
- Create a new empty document corpus:
83
- - Specify a custom name for your corpus
84
- - Sets up the corpus with recommended embedding model configuration
85
- - Prepares the corpus for document ingestion
86
-
87
- ### 4. Add New Data
88
- Add documents to existing corpora or create new ones:
89
- - Supports Google Drive URLs and GCS (Google Cloud Storage) paths
90
- - Automatically creates new corpora if they don't exist
91
-
92
- ### 5. Get Corpus Information
93
- Provides detailed information about a specific corpus:
94
- - Shows document count, file metadata, and creation time
95
- - Useful for understanding corpus contents and structure
96
-
97
- ### 6. Delete Corpus
98
- Removes corpora that are no longer needed:
99
- - Requires confirmation to prevent accidental deletion
100
- - Permanently removes the corpus and all associated files
101
-
102
- ## Troubleshooting
103
-
104
- If you encounter issues:
105
-
106
- - **Authentication Problems**:
107
- - Run `gcloud auth application-default login` again
108
- - Check if your service account has the necessary permissions
109
-
110
- - **API Errors**:
111
- - Ensure the Vertex AI API is enabled: `gcloud services enable aiplatform.googleapis.com`
112
- - Verify your project has billing enabled
113
-
114
- - **Quota Issues**:
115
- - Check your Google Cloud Console for any quota limitations
116
- - Request quota increases if needed
117
-
118
- - **Missing Dependencies**:
119
- - Ensure all requirements are installed: `pip install -r requirements.txt`
120
-
121
- ## Additional Resources
122
-
123
- - [Vertex AI RAG Documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/rag-overview)
124
- - [Google Agent Development Kit (ADK) Documentation](https://github.com/google/agents-framework)
125
- - [Google Cloud Authentication Guide](https://cloud.google.com/docs/authentication)
 
1
+ ---
2
+ title: Hello Earth
3
+ emoji: 🌎
4
+ colorFrom: gray
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 5.49.1
8
+ app_file: gradio/gradio_app_v2.py
9
+ pinned: false
10
+ python_version: 3.13.5
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference