{"id":492,"date":"2026-09-24T10:15:00","date_gmt":"2026-09-24T08:15:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?p=492"},"modified":"2026-09-10T10:52:48","modified_gmt":"2026-09-10T08:52:48","slug":"building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/","title":{"rendered":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">Standard Large Language Models (LLMs) frequently suffer from hallucinations and outdated knowledge cutoffs when queried about internal corporate manuals, proprietary databases, or highly specialized technical documentation. Retrieval-Augmented Generation (RAG) overcomes these limitations by anchoring the generation process in a verified, enterprise-specific knowledge repository. Implementing a serverless RAG architecture using Google Cloud Vertex AI Embeddings and BigQuery Vector Search enables scalable semantic search across millions of document chunks without managing dedicated vector database infrastructure.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">1. Architectural Framework: Serverless RAG on Google Cloud<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">An enterprise-grade RAG pipeline on Google Cloud decouples document processing, semantic indexing, and answer generation across three managed services:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Data Ingestion &amp; Chunking:<\/strong> Raw PDF manuals, intranet wikis, and structured database tables are ingested into Google Cloud Storage (GCS) and split into semantic chunks of 500\u20131000 tokens with a 10% overlap.<\/li>\r\n<li><strong>BigQuery ML Vector Indexing:<\/strong> Chunks are stored in BigQuery tables, where Vertex AI embedding models (e.g., <code>text-embedding-004<\/code> or <code>text-multilingual-embedding-002<\/code>) generate high-dimensional vector representations directly via SQL.<\/li>\r\n<li><strong>Grounding with Vertex AI Gemini:<\/strong> When a query arrives, BigQuery Vector Search executes an approximate nearest neighbor (ANN) search to retrieve the top-k most relevant text chunks, which are then injected as factual context into the prompt of a Gemini model.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"lw-diagram\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/hand-rag-en.png\" width=\"1120\" height=\"630\" alt=\"Two lanes: the upper one builds the vector index once, the lower one answers each question via vector search and a grounded Gemini prompt\">\n<figcaption>Indexing and answering are two separate jobs joined by one artefact: the vector index is built once and read on every question, which is what keeps the answers grounded and the cost predictable.<\/figcaption>\n<\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">2. Step-by-Step Embedding Generation in BigQuery ML<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To generate vector embeddings without exporting datasets to external Python scripts, a remote Vertex AI model connection must be established within BigQuery. The following SQL script connects the embedding model and transforms a table of raw document chunks into a vector-indexed knowledge repository:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-sql\">-- 1. Create a remote connection to Vertex AI Embedding endpoint\nCREATE OR REPLACE MODEL `enterprise_kb.vertex_embed_model`\nREMOTE WITH CONNECTION `us-central1.vertex_ai_connection`\nOPTIONS (\n    ENDPOINT = 'text-embedding-004'\n);\n\n-- 2. Generate vector embeddings for raw corporate document chunks\nCREATE OR REPLACE TABLE `enterprise_kb.document_embeddings` AS\nSELECT\n    doc_id,\n    chunk_id,\n    content_text,\n    source_url,\n    ml_generate_embedding_result AS content_embedding\nFROM\n    ML.GENERATE_EMBEDDING(\n        MODEL `enterprise_kb.vertex_embed_model`,\n        TABLE `enterprise_kb.raw_document_chunks`,\n        STRUCT(TRUE AS flatten_json_output)\n    )\nWHERE\n    content_text IS NOT NULL;<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">3. Step-by-Step Vector Indexing &amp; Semantic Search<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To ensure sub-second query performance across large document repositories, an Inverted File (IVF) vector index must be applied to the embedding column before running semantic similarity searches:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-sql\">-- 1. Create an Inverted File (IVF) Approximate Nearest Neighbor index\nCREATE VECTOR INDEX `kb_semantic_index`\nON `enterprise_kb.document_embeddings`(content_embedding)\nOPTIONS (\n    index_type = 'IVF',\n    distance_type = 'COSINE',\n    ivf_options = '{\"num_lists\": 1000}'\n);\n\n-- 2. Execute a vector similarity search to retrieve top-3 relevant chunks\nSELECT\n    base.doc_id,\n    base.chunk_id,\n    base.content_text,\n    base.source_url,\n    distance AS cosine_distance\nFROM\n    VECTOR_SEARCH(\n        TABLE `enterprise_kb.document_embeddings`,\n        'content_embedding',\n        (\n            SELECT ml_generate_embedding_result AS content_embedding\n            FROM ML.GENERATE_EMBEDDING(\n                MODEL `enterprise_kb.vertex_embed_model`,\n                (SELECT 'What are the SLA escalation rules for critical server outages?' AS content_text),\n                STRUCT(TRUE AS flatten_json_output)\n            )\n        ),\n        top_k =&gt; 3,\n        distance_type =&gt; 'COSINE'\n    )\nORDER BY distance ASC;<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">4. Step-by-Step RAG Grounding Pipeline with Gemini<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Once the relevant context chunks are retrieved via BigQuery Vector Search, a structured grounding prompt is assembled and transmitted to the Vertex AI Gemini API via Python:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-python\">from google.cloud import bigquery\nimport vertexai\nfrom vertexai.generative_models import GenerativeModel\n\n# Initialize Google Cloud clients\nbq_client = bigquery.Client(project='enterprise-ai-project')\nvertexai.init(project='enterprise-ai-project', location='us-central1')\n\ndef answer_query_with_rag(user_question):\n    \"\"\"Executes a BigQuery vector search and grounds Gemini responses.\"\"\"\n    \n    # Query BigQuery Vector Search for top-3 semantic chunks\n    search_query = f\"\"\"\n        SELECT base.content_text, base.source_url\n        FROM VECTOR_SEARCH(\n            TABLE `enterprise_kb.document_embeddings`,\n            'content_embedding',\n            (\n                SELECT ml_generate_embedding_result AS content_embedding\n                FROM ML.GENERATE_EMBEDDING(\n                    MODEL `enterprise_kb.vertex_embed_model`,\n                    (SELECT @question AS content_text),\n                    STRUCT(TRUE AS flatten_json_output)\n                )\n            ),\n            top_k =&gt; 3,\n            distance_type =&gt; 'COSINE'\n        )\n    \"\"\"\n    \n    job_config = bigquery.QueryJobConfig(\n        query_parameters=[bigquery.ScalarQueryParameter(\"question\", \"STRING\", user_question)]\n    )\n    results = bq_client.query(search_query, job_config=job_config).result()\n    \n    # Format retrieved chunks into a factual context block\n    context_block = \"\\n---\\n\".join([f\"Source ({row.source_url}): {row.content_text}\" for row in results])\n    \n    # Construct strict RAG prompt\n    rag_prompt = f\"\"\"You are an authoritative enterprise technical assistant.\nAnswer the user's question ONLY using the facts provided in the Context below.\nIf the answer cannot be determined from the Context, state explicitly that information is unavailable.\n\nContext:\n{context_block}\n\nQuestion:\n{user_question}\n\"\"\"\n\n    model = GenerativeModel(\"gemini-1.5-pro\")\n    response = model.generate_content(rag_prompt)\n    return response.text\n\nif __name__ == '__main__':\n    output = answer_query_with_rag(\"What are the SLA escalation rules for critical server outages?\")\n    print(output)<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">5. Summary &amp; Architectural Value<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>What this tutorial achieves:<\/strong> The deployment of a serverless, highly scalable RAG knowledge base utilizing Google Cloud Vertex AI embeddings, BigQuery ML vector indexing, and Gemini generative grounding.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Resulting value:<\/strong> Domain-specific questions regarding internal corporate documentation, manuals, and databases are answered with high precision and verifiable source attribution. AI hallucinations are eliminated by strictly bounding answers to retrieved organizational facts. Furthermore, executing semantic indexing and vector searches directly within BigQuery removes the need for expensive, dedicated vector database clusters while maintaining enterprise-grade data security and IAM governance.<\/p>\r\n\n\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.cloud.google.com\/gemini-enterprise-agent-platform\/models\/grounding\/ground-responses-using-rag\" target=\"_blank\" rel=\"noopener noreferrer\">Ground responses using RAG (Vertex AI)<\/a><\/li>\n<li><a href=\"https:\/\/docs.cloud.google.com\/bigquery\/docs\" target=\"_blank\" rel=\"noopener noreferrer\">BigQuery documentation<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>A technical step-by-step tutorial on building a serverless RAG knowledge base using BigQuery Vector Search and Vertex AI Gemini for enterprise data.<\/p>\n","protected":false},"author":1,"featured_media":14052,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92636],"tags":[91380,91333,91407,91404,91219,91410],"class_list":["post-492","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-cloud-ai","tag-artificial-intelligence","tag-bigquery","tag-google-cloud","tag-llm","tag-tutorial","tag-vertex-ai"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"A technical step-by-step tutorial on building a serverless RAG knowledge base using BigQuery Vector Search and Vertex AI Gemini for enterprise data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-24T08:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery\",\"datePublished\":\"2026-09-24T08:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/\"},\"wordCount\":455,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-492-building-rag-knowledge-base-google-c-g.png\",\"keywords\":[\"Artificial Intelligence\",\"BigQuery\",\"Google Cloud\",\"LLM\",\"Tutorial\",\"Vertex AI\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/\",\"name\":\"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-492-building-rag-knowledge-base-google-c-g.png\",\"datePublished\":\"2026-09-24T08:15:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-492-building-rag-knowledge-base-google-c-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-492-building-rag-knowledge-base-google-c-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Building a RAG Knowledge Base with Google Cloud Vertex AI & BigQuery\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/","og_locale":"en_US","og_type":"article","og_title":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog","og_description":"A technical step-by-step tutorial on building a serverless RAG knowledge base using BigQuery Vector Search and Vertex AI Gemini for enterprise data.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-24T08:15:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery","datePublished":"2026-09-24T08:15:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/"},"wordCount":455,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png","keywords":["Artificial Intelligence","BigQuery","Google Cloud","LLM","Tutorial","Vertex AI"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/","name":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png","datePublished":"2026-09-24T08:15:00+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-492-building-rag-knowledge-base-google-c-g.png","width":1200,"height":630,"caption":"Building a RAG Knowledge Base with Google Cloud Vertex AI & BigQuery"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/building-a-rag-knowledge-base-with-google-cloud-vertex-ai-bigquery\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a RAG Knowledge Base with Google Cloud Vertex AI &amp; BigQuery"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=492"}],"version-history":[{"count":6,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":17958,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/492\/revisions\/17958"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/14052"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}