# LLM blueprints

> LLM blueprints - LLMブループリントは、生成AIアプリケーションで大規模言語モデルをどのように設定し、使用するかを定義します。
> DataRobotが提供する事前設定済みのLLMを使用するか、独自のデプロイからカスタムモデルLLMを作成できます。
> LLMブループリントを使用すると、システムプロンプト、Temperature設定、およびアプリケーションでのLLMの動作を制御するその他のパラメーターを設定できます。

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-15T05:55:44.622538+00:00` (UTC).

## Primary page

- [LLM blueprints](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [利用可能なLLMのリスト](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#list-available-llms): In-page section heading.
- [プレイグラウンドの作成](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#create-a-playground): In-page section heading.
- [LLMブループリントの作成](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#create-an-llm-blueprint): In-page section heading.
- [LLMブループリントの取得とリスト](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#retrieve-and-list-llm-blueprints): In-page section heading.
- [LLMブループリントの更新](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#update-an-llm-blueprint): In-page section heading.
- [既存のブループリントからブループリントを作成する](https://docs.datarobot.com/ja/docs/api/dev-learning/python/genai/llm-blueprints.html.md#create-a-blueprint-from-an-existing-blueprint): In-page section heading.

## Documentation content

[LLMブループリント](https://docs.datarobot.com/ja/docs/agentic-ai/playground-tools/build-llm-blueprints.html.md#working-with-llm-blueprints) は、生成AIアプリケーションで大規模言語モデルをどのように設定し、使用するかを定義します。 DataRobotが提供する事前設定済みのLLMを使用するか、独自のデプロイからカスタムモデルLLMを作成できます。 LLMブループリントを使用すると、システムプロンプト、Temperature設定、およびアプリケーションでのLLMの動作を制御するその他のパラメーターを設定できます。

## 利用可能なLLMのリスト

利用可能なすべてのLLMを表示するには、 [datarobot.LLMDefinition.list()](https://docs.datarobot.com/ja/docs/api/reference/sdk/gen-llm-generation.html.md#datarobot.models.genai.llm.LLMDefinition.list) を使用します。

```
import datarobot as dr
llms = dr.genai.LLMDefinition.list()
for llm in llms:
    print(f"{llm.name}: {llm.description}")
    print(f"  Vendor: {llm.vendor}")
    print(f"  Context size: {llm.context_size}")
    print(f"  Active: {llm.is_active}") 
```

ユースケースでLLMをフィルターすることもできます。

```
use_case = dr.UseCase.get(use_case_id)
llms = dr.genai.LLMDefinition.list(use_case=use_case) 
```

## プレイグラウンドの作成

LLMブループリントを作成するにはプレイグラウンドが必要です。 プレイグラウンドは、さまざまなLLM設定を試行できるワークスペースです。 プレイグラウンドを作成する際は、以下を指定する必要があります。

- name ：プレイグラウンドのわかりやすい名前。
- description ：プレイグラウンドの目的の任意の説明。
- use_case ：プレイグラウンドをリンクさせるユースケース。
- playground_type ：プレイグラウンドのタイプ。デフォルトは dr.enums.PlaygroundType.RAG です。

```
import datarobot as dr
playground = dr.genai.Playground.create(
    name="My GenAI Playground",
    use_case=use_case.id
)
playground 
```

ユースケース内にプレイグラウンドを作成することもできます。

```
use_case = dr.UseCase.get(use_case_id)
playground = dr.genai.Playground.create(
    name="Use Case Playground",
    use_case=use_case.id
) 
```

## LLMブループリントの作成

カスタム設定を使用して新しいLLMブループリントを作成します。 LLMブループリントを作成する際は、以下を指定する必要があります。

- playground ：ブループリントに関連付けるプレイグラウンドIDまたはPlaygroundオブジェクト。
- name ：LLMブループリントのわかりやすい名前。
- llm ：使用するLLM定義IDまたはLLMDefinitionオブジェクト。
- llm_settings ：システムプロンプト、Temperature、最大出力長などのLLM構成設定を含むディクショナリ。
- description ：ブループリントの任意の説明。
- prompt_type ：プロンプティング戦略。デフォルトは dr.enums.PromptType.CHAT_HISTORY_AWARE です。

```
import datarobot as dr
llms = dr.genai.LLMDefinition.list()
gpt4 = [llm for llm in llms if 'gpt-4' in llm.name.lower()][0]
playground = dr.genai.Playground.create(name="Customer Support Playground")
blueprint = dr.genai.LLMBlueprint.create(
    playground=playground.id,
    name="Customer Support Assistant",
    description="LLM for customer support queries",
    llm=gpt4.id,
    llm_settings={
        "system_prompt": "You are a helpful customer support assistant. Be concise and professional.",
        "temperature": 0.7,
        "max_completion_length": 500
    }
)
blueprint 
```

## LLMブループリントの取得とリスト

[datarobot.LLMBlueprint.get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/gen-llm-generation.html.md#datarobot.models.genai.llm_blueprint.LLMBlueprint.get) および [datarobot.LLMBlueprint.list()](https://docs.datarobot.com/ja/docs/api/reference/sdk/gen-llm-generation.html.md#datarobot.models.genai.llm_blueprint.LLMBlueprint.list) を使用して、特定のブループリントを取得するか、利用可能なすべてのブループリントをリストします。

特定のブループリントを取得するには：

```
blueprint = dr.genai.LLMBlueprint.get(blueprint_id)
blueprint 
```

すべてのブループリントをリストするには：

```
all_blueprints = dr.genai.LLMBlueprint.list()
print(f"Found {len(all_blueprints)} LLM blueprint(s):")
for bp in all_blueprints:
    print(f"  - {bp.name} (ID: {bp.id})") 
```

プレイグラウンドでブループリントをフィルターするには：

```
playground_blueprints = dr.genai.LLMBlueprint.list(playground=playground.id) 
```

LLMタイプでフィルターするには：

```
gpt_blueprints = dr.genai.LLMBlueprint.list(llms=[gpt4.id]) 
```

## LLMブループリントの更新

[datarobot.LLMBlueprint.update()](https://docs.datarobot.com/ja/docs/api/reference/sdk/gen-llm-generation.html.md#datarobot.models.genai.llm_blueprint.LLMBlueprint.update) を使用してブループリント設定を変更します。

```
blueprint = dr.genai.LLMBlueprint.get(blueprint_id)
blueprint.update(
    name="Updated Customer Support Assistant",
    llm_settings={
        "system_prompt": "You are an expert customer support assistant.",
        "temperature": 0.5
    }
) 
```

設定をロックするためにブループリントを保存します。

```
blueprint.update(is_saved=True) 
```

簡単にアクセスできるようにブループリントにスターを付けます。

```
blueprint.update(is_starred=True) 
```

## 既存のブループリントからブループリントを作成する

[datarobot.LLMBlueprint.create_from_llm_blueprint()](https://docs.datarobot.com/ja/docs/api/reference/sdk/gen-llm-generation.html.md#datarobot.models.genai.llm_blueprint.LLMBlueprint.create_from_llm_blueprint) を使用して、バリエーションを試すために既存のブループリントのコピーを作成します。

```
original_blueprint = dr.genai.LLMBlueprint.get(blueprint_id)
new_blueprint = dr.genai.LLMBlueprint.create_from_llm_blueprint(
    llm_blueprint=original_blueprint,
    name="Experimental Variant",
    description="Testing different temperature settings"
)
new_blueprint 
```
