Back to directory

Generative AI Knowledge Base

A Terraform module that deploys an end-to-end pipeline for extracting question-and-answer pairs from documents and fine-tuning a large language model on them using Google Cloud Vertex AI.

Generative AI Knowledge Base

This solution is a Google Cloud sample showing how to extract question-and-answer pairs from documents with generative AI and use them to fine-tune a large language model on Vertex AI. Uploading a new document triggers a Cloud Function webhook, which uses Document AI's OCR to extract the document's text and indexes that text in Vector Search.

A Vertex AI large language model then generates candidate question-and-answer pairs from the extracted text, which are saved to Firestore; after a human validates them, a fine-tuning dataset is generated from that Firestore data, and the fine-tuned model is deployed and saved in the Vertex AI Model Registry. The Terraform module provisions the underlying Google Cloud project resources for this pipeline, including the storage buckets, Vector Search index and endpoint, Firestore database, and Document AI processor, and reports configuration in about two minutes and deployment in about six.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.