Home

Awesome

Generative AI Knowledge Base

Description

Tagline

Fine tune an LLM model to answer questions from your documents.

Detailed

This solution showcases how to extract question & answer pairs out of documents using Generative AI. It provides an end-to-end demonstration of QA extraction and fine-tuning of a large language model (LLM) on Vertex AI. Along the way, the solution utilizes Document AI Character Recognition (OCR), Firestore, Vector Search, Vertex AI Studio, and Cloud Functions.

Architecture

Knowledge Base using Generative AI

Prerequisites

Documentation

Deployment Duration

Configuration: 2 mins Deployment: 6 mins

Cost

Cost Details

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Inputs

NameDescriptionTypeDefaultRequired
disable_services_on_destroyWhether project services will be disabled when the resources are destroyed.boolfalseno
documentai_locationDocument AI location, see https://cloud.google.com/document-ai/docs/regionsstring"us"no
firestore_locationFirestore location, see https://firebase.google.com/docs/firestore/locationsstring"nam5"no
labelsA set of key/value label pairs to assign to the resources deployed by this blueprint.map(string){}no
project_idThe Google Cloud project ID to deploy tostringn/ayes
regionThe Google Cloud region to deploy tostring"us-central1"no
unique_namesWhether to use unique names for resourcesboolfalseno

Outputs

NameDescription
bucket_docs_nameThe name of the docs bucket created
bucket_main_nameThe name of the main bucket created
docs_index_endpoint_idThe ID of the docs index endpoint
docs_index_idThe ID of the docs index
documentai_processor_idThe full Document AI processor path ID
firestore_database_nameThe name of the Firestore database created
neos_tutorial_urlThe URL to launch the in-console tutorial for the Generative AI Knowledge Base solution
predictions_notebook_urlThe URL to open the notebook for model predictions in Colab
unique_idThe unique ID for this deployment
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

A service account with the following roles must be used to provision the resources of this module:

The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.

APIs

A project with the following APIs enabled must be used to host the resources of this module:

The Project Factory module can be used to provision a project with the necessary APIs enabled.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Security Disclosures

Please see our security disclosure process.