Creating conceptual data mapping documents: Worked Example — Fine-Tuning (NVIDIA-Certified Professional: Generative AI LLMs)

{ "title": "NVIDIA-Certified Professional: Generative AI LLMs - Creating Conceptual Data Mapping Documents: Worked Example", "category"...

{ "title": "NVIDIA-Certified Professional: Generative AI LLMs - Creating Conceptual Data Mapping Documents: Worked Example", "category": "NVIDIA-Certified Professional: Generative AI LLMs", "hashtags": "fine-tuning, data-mapping, generative-ai, nvidia-certification, llm-training", "content": "

Creating Conceptual Data Mapping Documents: A Worked Example for Fine-Tuning

Within the NVIDIA-Certified Professional: Generative AI LLMs certification, fine-tuning large language models (LLMs) requires precise handling of data. A foundational step is creating conceptual data mapping documents that define how raw data sources correspond to the model’s input format. This ensures data consistency and quality during fine-tuning.

Scenario Overview

Imagine you are tasked with fine-tuning an LLM on a custom dataset of customer support chat logs. The raw data is stored in JSON files with fields such as timestamp, user_message, agent_response, and chat_id. The model expects input in a specific prompt-completion format for supervised fine-tuning:

Your goal is to create a conceptual data mapping document that clearly defines how to transform the raw JSON data into the required prompt-completion pairs.

Step 1: Identify Source Data Fields

Begin by listing all relevant fields in the raw data:

For fine-tuning, only user_message and agent_response are essential. The other fields can be used for filtering or metadata but are not part of the model input.

Step 2: Define Target Data Format

The model requires data in the following JSONL format:

{ \"prompt\": \"User message text\",\ \"completion\": \"Agent response text\"}

Each line represents one training example.

Step 3: Map Source to Target Fields

Create a mapping table in the conceptual document:

Source FieldTarget FieldTransformation / Notes
user_messagepromptDirect copy of text
agent_responsecompletionDirect copy of text
timestampNot used in training input
chat_idOptional metadata, excluded from input

Step 4: Specify Data Cleaning and Preprocessing

Include notes on necessary preprocessing steps, for example:

Step 5: Outline Importer/Exporter Requirements

The conceptual document should specify that the importer script will:

The exporter should be able to reverse this process if needed for validation or audit.

Step 6: Document Example Entry

Include an example in the conceptual document:

Source JSON:{ \"timestamp\": \"2024-05-01T10:15:00Z\", \"user_message\": \"How do I reset my password?\", \"agent_response\": \"You can reset your password by clicking 'Forgot Password' on the login page.\", \"chat_id\": \"abc123\"}Mapped Output JSONL:{ \"prompt\": \"How do I reset my password?\", \"completion\": \"You can reset your password by clicking 'Forgot Password' on the login page.\" }

Summary

This conceptual data mapping document acts as a blueprint for building custom importers and exporters, ensuring that the fine-tuning data pipeline is robust and reproducible. By clearly defining source-to-target mappings, transformations, and examples, you reduce errors and streamline the fine-tuning process critical for the NVIDIA-Certified Professional: Generative AI LLMs exam and real-world applications.

" }

More in this topic

Ready to test your knowledge?

Put what you've learned into practice with a quick quiz and track your progress.

Test your knowledge →