A RAG implementation to read GCP official docs. Requires python gcp_docs to be running

@clewis clewis authored 6 days ago
.mvn/ wrapper initial commit. very dirty code. more of PoC to figure things out 8 days ago
src refactored RagResponse to give token counts and name of model 6 days ago
.gitignore initial commit. very dirty code. more of PoC to figure things out 8 days ago
HELP.md initial commit. very dirty code. more of PoC to figure things out 8 days ago
README.md refactored RagResponse to give token counts and name of model 6 days ago
curl_example.md initial commit. very dirty code. more of PoC to figure things out 8 days ago
mvnw initial commit. very dirty code. more of PoC to figure things out 8 days ago
mvnw.cmd initial commit. very dirty code. more of PoC to figure things out 8 days ago
pom.xml initial commit. very dirty code. more of PoC to figure things out 8 days ago
schema.sql initial commit. very dirty code. more of PoC to figure things out 8 days ago
README.md
Model Size Context Window Notes
qwen3:4b-q4_K_M 2.6 GB 40K Verbose response
deepseek-r1:1.5b 1.1 GB 128K

export OPENAI_API_KEY=$(cat $HOME/.config/openai/api_key)

curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": ""}'
# Exam 12 - Question 2

curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "You are an IT Specialist at a technology company, and your Dataproc cluster runs in a single Virtual Private Cloud (VPC) network in a single subnetwork with range 172.16.20.128/25. The subnetwork runs out of private IP addresses. Your manager asks you to find a way to add new VMs for communication with the cluster while minimizing the steps involved. What should you do? A. Create a new subnetwork in the existing VPC with a range of 172.16.21.0/24 and configure the VMs to use that subnetwork. B. Create a new VPC network for the VMs with a subnet of 172.32.0.0/16. Enable VPC network Peering between the Dataproc VPC network and the VMs VPC network. Configure a custom Route exchange. C. Configure Shared VPC for the existing VPC and add the VMs to a new subnetwork in the Shared VPC. D. Modify the existing subnet range to 172.16.20.0/24."}'
# Exam 12 - Question 2
# OPEN AI

curl -X POST http://localhost:8080/openai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "You are an IT Specialist at a technology company, and your Dataproc cluster runs in a single Virtual Private Cloud (VPC) network in a single subnetwork with range 172.16.20.128/25. The subnetwork runs out of private IP addresses. Your manager asks you to find a way to add new VMs for communication with the cluster while minimizing the steps involved. What should you do? A. Create a new subnetwork in the existing VPC with a range of 172.16.21.0/24 and configure the VMs to use that subnetwork. B. Create a new VPC network for the VMs with a subnet of 172.32.0.0/16. Enable VPC network Peering between the Dataproc VPC network and the VMs VPC network. Configure a custom Route exchange. C. Configure Shared VPC for the existing VPC and add the VMs to a new subnetwork in the Shared VPC. D. Modify the existing subnet range to 172.16.20.0/24."}'
curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "As a developer at a software company, you have been working on a project that utilizes Google Cloud services. Initially, you used your personal credit card for the expenses and later got reimbursed by your company. However, your company now wants to directly handle the billing for these services in their monthly invoice. What should you do to make this happen? A. Use Google Cloud Pub/Sub to send billing notifications to your finance team. B. Change the billing account of your projects to the billing account of your company. C. Enable Google Cloud Monitoring alerts for billing thresholds to notify your financial team. D. Share your credit card details with your financial team and have them add it to a new billing account."}'
curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "As a database administrator for a rapidly growing tech company, you have been tasked with migrating the following on-premises data manage- ment solutions to Google Cloud in order to maximize scalability and minimize operational and infrastructure management: • One MySQL cluster for your company’s primary database • Apache Kafka for your company’s event streaming platform • One Cloud SQL for PostgreSQL database for your company’s analytical and reporting needs Which Google-recommended solutions should you implement for the migration? A. Migrate from MySQL to Cloud SQL, from Kafka to Dataflow, and from Cloud SQL for PostgreSQL to Cloud Bigtable. B. Migrate from MySQL to Cloud Spanner, from Kafka to Pub/Sub, and from Cloud SQL for PostgreSQL to BigQuery. C. Migrate from MySQL to Cloud SQL, from Kafka to Pub/Sub, and from Cloud SQL for PostgreSQL to BigQuery. D. Migrate from MySQL to Firestore, from Kafka to Pub/Sub, and from Cloud SQL for PostgreSQL to Bigtable."}'
#e4q1

curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "You are working as a network administrator for a company with two subnets (subnet-a and subnet-b) in their default VPC. The company’s database servers are located in subnet-a, while the application servers and web servers operate in subnet-b. Your task is to configure a firewall rule that permits database traffic exclusively from the application servers to the database servers. What steps should be taken to accomplish this? A. • Create service accounts sa-app and sa-db. • Associate service account sa- app with the application servers and the service account sa-db with the database servers. • Create an ingress firewall rule to allow network traffic from source service account sa-app to target service account sa-db. B. Create network tags db-server and app-server. • Add the db-server tag to the application servers and the app-server tag to the database servers. • Create an egress firewall rule to allow network traffic from source network tag db-server to target network tag app-server. C. Create a service account sa-app and a network tag db-server. • Associate the service account sa-app with the database servers and the network tag db-server with the application servers. • Create an ingress firewall rule to allow network traffic from source service account sa-app to target network tag db-server. D. Create a service account sa-app and a network tag app-server. • Add the service account sa-app to the application servers and the network tag app-server to the database servers. • Create an ingress firewall rule to allow network traffic from source VPC IP addresses and target the subnet-b IP addresses"}'
#e1q6

curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "Question 6: As a software engineer at a data analytics company, you are tasked with setting up permissions for a group of Compute Engine instances to enable them to write data intoa specific Cloud Storage bucket, while adhering to Google-recommended practices. What is the most appropriate action to take? A. Create a service account and add it to the IAM role ‘compute.admin’ for that bucket. B.CreateaserviceaccountandaddittotheIAMrole‘storage.legacyBucketReader’ for that bucket. C. Create a service account and add it to the IAM role ‘storage.objectCreator’ for that bucket. 4D. Create a service account with an access scope. Use the access scope ‘https://www.googleapis.com/auth/cloud-platform’."}'
#e1q4

curl -X POST http://localhost:8080/api/ai/chat-with-sources  -H "Content-Type: application/json"  -d '{"question": "As a developer working for a software company specializing in the financeindustry, youarerunningLinuxworkloadsonComputeEngineinstances. Your company is planning to collaborate with a new operations partner that does not have Google Accounts. In order to maintain the installed tools on these instances, you need to grant the operations partner access. How should you proceed? A. Configure Compute Engine instances to use an external metadata server and grant the operations partner access to that server. B. Ask the operations partner to generate SSH key pairs, and add the public keys to the VM instances. C. Enable Cloud NAT and grant the operations partner access to the Cloud NAT gateway to allow traffic redirection. D. Enable Cloud IAP for the Compute Engine instances, and add the operations partner as a Cloud IAP Tunnel User."}'