0 / 0
資料の 英語版 に戻る

granite-13b-chat-v2 基盤モデルを呼び出す IBM

最終更新: 2025年3月14日
granite-13b-chat-v2 基盤モデルを呼び出す IBM

watsonx.ai で IBM granite-13b-chat-v2基盤モデル推論を試して、この多目的な基盤モデルさまざまなタスクの達成にどのように役立つかを確認します。

granite-13b-chat-v2 基盤モデルは、ビジネスユーザーが仕事を遂行するのを支援するように設計された130億パラメータの大型言語モデルです。 IBM Granite シリーズの基盤モデル、企業に特化したデータセットでトレーニングされています。つまり、モデルはさまざまな業界の専門用語や専門用語に精通しており、関連する業界の知識に基づいたコンテンツをより容易に生成できるということです。

granite-13b-chat-v2 基盤モデルの詳細情報(バージョン番号や命令チューニングの詳細など)については、 モデルカードをご覧ください。

granite-13b-chat-v2 の基盤モデルは、以下の使用事例に最適化されています

このモデルはさまざまなユースケースに使用できるため、最良の結果を得るためには、モデル・パラメーターとシステム・プロンプトを調整する必要がある。

granite-13b-chat-v2との会話

granite-13b-chat-v2 基盤モデルとチャットをする際に最良の結果を得るには、まず以下の推奨事項に従い、その後、希望する結果を得るために試行錯誤してください。

次の表は、会話タスク用に granite-13b-chat-v2基盤モデルを促すための推奨モデル パラメータを示しています。

表 1. 会話タスクのプロンプトgranite-13b-chat-v2からの推奨モデルパラメータ
パラメーター 推奨値または範囲 説明
デコード サンプリング サンプリングデコーディングは、より創造的なテキストを生成し、チャットボットからの応答に興味と個性を加えるのに役立つ。 しかし、予測不可能なアウトプットにつながる可能性もある。 次のモデル・パラメーターのセットで、創造性の度合いをコントロールすることができる。
トップP:0.85
トップK:50
温度:0.7
これらのサンプリングデコーディングパラメーターはすべて連動している。
このサブセットには、最も可能性の高い50個のトークン(Top K)、または確率スコアの合計が0.85になるトークン(Top P)が含まれます。 0.7という比較的低い温度値が、トークンのスコアの差を増幅させている。 その結果、カットされたトークンは、通常、最も可能性の高いトークンである。
- To increase the creativity and diversity of responses, increase the temperature value.
• モデルが幻覚を見るようなら、温度値を下げる。
反復ペナルティ 1.05 単語やフレーズを繰り返すことで、チャットボットがロボットのように聞こえるのを防ぐために、ペナルティをこの低い値に設定します。
ランダム・シード
例えば、温度を変えて出力にどのような影響を与えるかを確認したい場合、同じ入力を繰り返し送信し、毎回温度の値だけを変えます。 また、ランダムなトークンの選択がモデルの出力にも影響しないように、毎回5のような数値をランダムシードとして指定します。 毎回同じ数字を指定する限り、数字自体は問題ではない。
最大トークン数 900 granite-13b-chat-v2 基盤モデルコンテキストウィンドウの長さ(入力トークンと出力トークンを含む)は最大 8192 です。 トークンの詳細については、トークンとトークン化を参照してください。
各フォローアップ質問では、会話履歴がモデルプロンプトの一部として含まれます。 granite-13b-chat-v2 基盤モデルは通常、最大5ターン、または入力が4,000トークンに達するまで会話を維持することができます。

 

モデル・パラメータの詳細については、プロンプトのモデル・パラメータを参照してください。

granite-13b-chat-v2 基盤モデルチャットタスクを促すには、以下の手順をお試しください

  1. Prompt Lab のチャットモードから、 granite-13b-chat-v2 基盤モデルを選択します。

    granite-13b-chat-v2 をチャットモードで表示します。 Prompt Lab

  2. モデルパラメータパネルから、表1の推奨モデルパラメータ値を適用する。

  3. チャットモードでは、入力テキストをフォーマットせずにユーザー入力を送信できます。

    チャットモードでは、推奨される書式がプロンプトのテキストに適用されます。 テキストアイコン 完全なプロンプト・テキストを表示 をクリックすると、テキストのフォーマットを確認できます。

  4. フリーフォームモードで同じプロンプトを送信するには、システムプロンプトを設定する必要がある。

    指示を加える。 例えば、次のような指示文はモデルの訓練に使われたもので、モデルにとっては馴染み深いものである。

    あなたはGraniteチャット、IBMが開発したAI言語モデルです。 あなたは慎重なアシスタントだ。 あなたは注意深く指示に従う。 あなたは親切で無害であり、倫理的なガイドラインに従い、前向きな行動を促進する。 挨拶(例えば、hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup)には必ず「こんにちは」と返す! 私はIBMによって作られたGraniteチャットです。 今日はどうされましたか? それ以上何も言わず、会話を始めないでください。

    推奨されるシステム・プロンプト・テキストをコピーするには、次のコード・スニペットからクリップボードにコピーアイコンをクリックします。

    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior. You always respond to greetings (for example, hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup) with "Hello! I am Granite Chat, created by IBM. How can I help you today?". Please do not say anything else and do not start a conversation.
    

    会話を始める。

    チャットタスクに使われるプロンプトの最適な構造は以下の通りである。 プロンプトには、プロンプトの以下のセグメントを識別する構文が含まれる:

    • <|system|>:命令を識別します。これは、 基盤モデル システムプロンプトとしても知られています。
    • <|user|>:答えとなるクエリーテキスト。
    • <|assistant|>:プロンプトの最後で、生成された答えが期待されていることを示す合図。

    Prompt Lab からフリーフォームモードでプロンプトを送信する際は、プロンプトのフォーマットを指定されたものを使用してください。

    <|system|>
    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior. You always respond to greetings (for example, hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup) with "Hello! I am Granite Chat, created by IBM. How can I help you today?". Please do not say anything else and do not start a conversation.
    <|user|>
    {PROMPT}
    <|assistant|>
    
    
  5. 会話を続けるために、フォローアップの質問をする。

    複数のダイアログターンを持つチャットに使用されるプロンプトの最適な構造は以下の通りである。 Prompt Lab から自由形式モードでプロンプトを送信する場合は、このプロンプトフォーマットを使用してください。

    <|system|>
    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior. You always respond to greetings (for example, hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup) with "Hello! I am Granite Chat, created by IBM. How can I help you today?". Please do not say anything else and do not start a conversation.
    <|user|>
    {ROUND1_PROMPT}
    <|assistant|>
    {MODEL_RESPONSE}
    <|user|>
    {ROUND2_PROMPT}
    <|assistant|>
    
    

チャットの使用例を示す別のサンプルプロンプトについては、サンプルを参照してください:granite-13b-chat-v2 と会話する。

Prompt Lab のチャットモードの使用方法については、 Prompt Lab

granite-13b-chat-v2 を会話タスクのプロンプトにするヒント

  • フォローアップの質問では、代名詞を避ける。 例えば、"その変数は何を表しているのか?"と尋ねる ではなく、「それは何を表しているのか?

  • 基盤モデル表形式の応答を生成したい場合は、モデルのプロンプトで明示的に、マークダウンで生成される表を返すように依頼してください。

RAGパターンで事実に基づいた回答を返す

granite-13b-chat-v2 基盤モデル事実に基づく回答を返させるには、 検索拡張生成を使用します。 検索-補強された生成は、議論されるトピックに関する事実情報をモデルに提出する入力を根拠づける。 詳しくは、検索補強世代(RAG)を参照。

granite-13b-chat-v2 基盤モデル事実に基づく回答を返したい場合は、以下の推奨事項に従ってください。

次の表は、 granite-13b-chat-v2 基盤モデル 検索拡張生成を促すための推奨モデルパラメータをリストアップしたものです。

表 2. RAGタスクのプロンプトgranite-13b-chat-v2からの推奨モデルパラメータ
パラメーター 推奨値または範囲 説明
デコード 欲張り 貪欲なデコーディングは、最も可能性の高い選択肢のみからトークンを選択する。
反復ペナルティ 1 最も低い値を使用する。 事実に基づいた回答が目的であれば、繰り返しは許容される。
最大トークン数 500 モデルは質問にできるだけ完全に回答することができます。
granite-13b-chat-v2 基盤モデルコンテキストウィンドウの長さ(入力トークンと出力トークンを含む)は最大8192であることを覚えておいてください。 入力は、プロンプトの根拠となる文書を追加することも含めて、その制限内に収まるようにしてください。 トークンの詳細については、トークンとトークン化を参照してください。
停止基準 エンドテキスト granite-13b-chat-v2 基盤モデル便利な機能は、各レスポンスの最後に、<|endoftext>という名前の特別なトークンが含まれていることです。 生成モデルの中には、許容される最大数よりも少ないトークンで入力に対する応答を返すものがある場合、入力からパターンを繰り返すことができる。 このモデルでは、プロンプトに信頼性の高いストップシーケンスを組み込むことで、このような繰り返しを防いでいる。

 

モデル・パラメータの詳細については、プロンプトのモデル・パラメータを参照してください。

granite-13b-chat-v2 基盤モデル 検索拡張生成を実行させるには、以下の手順をお試しください

  1. モデルに議論させたいトピックについて、事実に基づいた情報が掲載され、使用許可を得ている信頼できる資料を探す。 文書やドキュメントの抜粋を、後でアクセスできるテキストエディタなどにコピーする。

    例えば、自社のウェブサイトや製品ドキュメントの製品情報などです。

  2. Prompt Lab から、プロンプトを構成できるようにフリーフォームモードを開きます。 granite-13b-chat-v2 の基盤モデルをお選びください。

  3. モデルパラメータパネルから、表2の推奨モデルパラメータを設定します。

  4. プロンプトでは、システムプロンプト、ユーザー入力、モデルの出力先を明確に定義する。

    たとえば、次のプロンプト構造は granite-13b-chat-v2基盤モデル関連情報を返すのに役立ちます。

    <|system|>
    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
    <|user|>
    You are an AI language model designed to function as a specialized Retrieval Augmented Generation (RAG) assistant. When generating responses, prioritize correctness, i.e., ensure that your response is grounded in context and user query. Always make sure that your response is relevant to the question.
    Answer Length: {ANSWER_LENGTH}
    [Document]
    {DOCUMENT1_TITLE}
    {DOCUMENT1_CONTENT}
    [End]
    [Document]
    {DOCUMENT2_TITLE}
    {DOCUMENT2_CONTENT}
    [End]
    [Document]
    {DOCUMENT3_TITLE}
    {DOCUMENT3_CONTENT}
    [End]
    {QUERY}
    <|assistant|>
    
    

    注意:文書内容の開始と終了は、特別なタグ[Document][End]で示されます。 プロンプトにコンテンツタイプやサブセクションのヘッダーを識別する特別なタグを追加する場合も、同様の構文を使用します。 granite-13b-chat-v2 基盤モデルが作成された際、次の特別なタグを処理するように訓練されました

    • <|system|>:命令を識別します。これは、 基盤モデル システムプロンプトとしても知られています。
    • <|user|>:答えとなるクエリーテキスト。
    • <|assistant|>:プロンプトの最後で、生成された答えが期待されていることを示す合図。

    カスタムタグに同じ<|tagname|>構文を使わないでください。

  5. このプロンプトテンプレートをコピーする場合は、 Prompt Lab のエディタに貼り付けた後、プレースホルダ変数を置き換えてください。

    表 2a: RAGテンプレートのプレースホルダー変数
    プレースホルダ変数 説明
    {ANSWER_LENGTH} オプション。 回答に期待される長さを定義します。 選択肢は以下の通り(短い回答から長い回答へ):single wordconcisenarrative
    {DOCUMENTn_TITLE} 事実情報を含む抜粋が引用されている文書のタイトル。 複数の文書の内容を含めることができます。 製品パンフレット
    {DOCUMENTn_CONTENT} モデルに知識を持って議論してもらいたい事実情報を抜粋した文章。 マーケティングパンフレット、製品資料、企業ウェブサイト、その他信頼できるリソースからのテキスト。
    {QUERY} 事実に基づいて答えるべき質問。 文書で取り上げられているトピックに関する質問。

     

    ヒント:別の方法として、プロンプトを再利用し、内容を毎回動的に置き換えることができるように、ドキュメントにプロンプト変数を定義して使用することもできる。 詳細については、再利用可能なプロンプトを作成するを参照してください。

検索機能付き生成プロンプトの例

以下のプロンプトでは、 granite-13b-chat-v2 基盤モデルを使用して、 プロンプトのチューニングに関する質問に回答します。

注意: この文書の内容は、基礎モデルのチューニング方法トピックから引用しています。

<|system|>
You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
<|user|>
You are an AI language model designed to function as a specialized Retrieval Augmented Generation (RAG) assistant. When generating responses, prioritize correctness, i.e., ensure that your response is grounded in context and user query. Always make sure that your response is relevant to the question.
Answer length: concise
[Document]
How prompt-tuning works
Foundation models are sensitive to the input that you give them. Your input, or how you prompt the model, can introduce context that the model will use to tailor its generated output. Prompt engineering to find the right prompt often works well. However, it can be time-consuming, error-prone, and its effectiveness can be restricted by the context window length that is allowed by the underlying model.
Prompt-tuning a model in the Tuning Studio applies machine learning to the task of prompt engineering. Instead of adding words to the input itself, prompt-tuning is a method for finding a sequence of values that, when added as a prefix to the input text, improve the model's ability to generate the output you want. This sequence of values is called a prompt vector.
Normally, words in the prompt are vectorized by the model. Vectorization is the process of converting text to tokens, and then to numbers defined by the model's tokenizer to identify the tokens. Lastly, the token IDs are encoded, meaning they are converted into a vector representation, which is the input format that is expected by the embedding layer of the model. Prompt-tuning bypasses the model's text-vectorization process and instead crafts a prompt vector directly. This changeable prompt vector is concatenated to the vectorized input text and the two are passed as one input to the embedding layer of the model. Values from this crafted prompt vector affect the word embedding weights that are set by the model and influence the words that the model chooses to add to the output.
To find the best values for the prompt vector, you run a tuning experiment. You demonstrate the type of output that you want for a corresponding input by providing the model with input and output example pairs in training data. With each training run of the experiment, the generated output is compared to the training data output. Based on what it learns from differences between the two, the experiment adjusts the values in the prompt vector. After many runs through the training data, the model finds the prompt vector that works best.
[End]
How does prompt tuning work?
<|assistant|>

granite-13b-chat-v2 基盤モデル、入力として提供されたドキュメントコンテンツの情報に基づいて、プロンプトチューニングの仕組みを正確に要約します。

出力は次のようになる:

プロンプトチューニングは、プロンプトベクトルと呼ばれる一連の値を調整することで、特定の出力を生成するモデルの能力を向上させる方法です。 プロンプトチューニングでは、入力に直接単語を追加するのではなく、プロンプトベクトルを作成し、モデルによって設定される単語埋め込み重みに直接影響を与える。 これは、入力テキストをベクトル化し、トークンIDをベクトル表現にエンコードすることで達成される。このベクトルは、細工されたプロンプトベクトルと連結され、モデルの埋め込みレイヤーに1つの入力として渡される。 この実験では、生成された出力と訓練データ例における所望の出力との差に基づいて、プロンプトベクトルの値を調整する。 トレーニングデータを何度も実行するうちに、モデルは最適なプロンプトベクトルを見つける。

 

NLPタスク

granite-13b-chat-v2 基盤モデル、分類や抽出などの自然言語処理タスクに利用できます。 granite-13b-chat-v2 モデルが作成された際、これらの自然言語処理タスクを実行するように訓練されました。

モデルのトレーニングでは、タスクの種類ごとに決められたプロンプトが使用された。 これらのタスクのいずれかを実行するためにモデルを使用する場合は、提出するプロンプトで確立された形式を模倣してください。

機密区分

granite-13b-chat-v2 基盤モデルを使用して情報を分類するには、以下の推奨事項に従ってください。

次の表は、分類タスクのために granite-13b-chat-v2基盤モデルを促すための推奨モデル パラメータを示しています。

表 3. 分類タスクのgranite-13b-chat-v2プロンプトからの推奨モデルパラメータ
パラメーター 推奨値または範囲 説明
デコード 欲張り 貪欲なデコーディングは、最も可能性の高い選択肢のみからトークンを選択するため、テキストを分類したい場合に最適である。
反復ペナルティ 1 最も低い値を使用する。 繰り返しが期待される。
最大トークン数 状況による 510のように、最長クラスラベルのトークン数をカバーする値を使用してください。 トークンを制限することで、モデルが適切なクラスラベルだけを返し、それ以外は返さないようにする。
停止基準 サポートされている各クラスラベルを停止シーケンスとして追加する。 停止シーケンスとしてクラスを追加すると、入力にクラスが割り当てられた後、モデルはテキストの生成を停止します。

 

granite-13b-chat-v2 基盤モデル分類タスクを実行させるには、以下の手順をお試しください

  1. モデルに入力に割り当てさせたいクラスまたは分類ラベルを特定する。 プロンプトのインストラクション・セグメントには、必ずこれらのクラス・ラベルを記載してください。

    例えば、顧客の商品レビューを肯定的か否定的かに分類したい場合、2つのクラスラベルを定義することができます:PostitiveNegativeです。

  2. モデルに分類させたいタイプの入力テキストの代表例を2つか3つ集める。

  3. プロンプトを構造化できるように、 Prompt Lab の granite-13b-chat-v2基盤モデルをフリーフォーム モードで操作します。

  4. モデルパラメータパネルから、表3から推奨されるモデルパラメータを設定します。

  5. プロンプトでは、システムプロンプト、ユーザー入力、モデルの出力の行き先を明確にします。

    例えば、 granite-13b-chat-v2 基盤モデルをテキストの分類に訓練する際には、以下のプロンプト構造が使用されました

    <|system|>
    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
    <|user|>
    {INSTRUCTION}
    Your response should only include the answer. Do not provide any further explanation.
    Here are some examples, complete the last one:
    {INPUT_LABEL}:
    {ICL_INPUT_1}
    {OUTPUT_LABEL}:
    {ICL_OUTPUT_1}
    {INPUT_LABEL}:
    {ICL_INPUT_2}
    {OUTPUT_LABEL}:
    {ICL_OUTPUT_2}
    {INPUT_LABEL}:
    {TEST_INPUT}
    {OUTPUT_LABEL}:
    <|assistant|>
    
    

    同様の構造を使って、モデルのトレーニングを活用することができる。 プロンプトテンプレートのプレースホルダ変数を置き換えるだけでよい。

    表 3a: 分類テンプレートのプレースホルダー変数
    プレースホルダ変数 説明
    {INSTRUCTION} タスクの説明。 モデルに入力に割り当ててほしいクラスのリストを含めます。 各製品のレビューについて、そのレビューが肯定的か否定的かを示してください。
    {INPUT_LABEL} 分類するテキストの短いラベル。 Input, Customer review, Feedback, Comment
    {OUTPUT_LABEL} 分類値を表す短いラベル。 Class
    {ICL_INPUT_N} オプション。 分類される入力テキストの例。 インコンテクスト学習をサポートするために、数発のプロンプトを使用したい場合は、例を追加します。 The service representative did not listen to a word I said. It was a waste of my time.
    {ICL_OUTPUT_N} 対応する入力テキスト例にクラスラベルを割り当てた出力例。 Positive, Negative

 

分類プロンプトの例

次のプロンプトは、顧客がサポートセンターのスタッフについて共有するフィードバックを分類したものです。

<|system|>
You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
<|user|>
For each feedback, specify whether the content is Positive or Negative. Your response should only include the answer. Do not provide any further explanation.
Here are some examples, complete the last one:
Feedback:
Carol, the service rep was so helpful. She answered all of my questions and explained things beautifully.
Class:
Positive
   
Feedback:
The service representative did not listen to a word I said. It was a waste of my time.
Class:
Negative
   
Feedback:
Carlo was so helpful and pleasant. He was able to solve a problem that I've been having with my software for weeks now.
Class:
<|assistant|>

このプロンプトが送信された際に、 granite-13b-chat-v2 基盤モデルによって生成される出力は、 Positive です。

抽出

granite-13b-chat-v2 基盤モデルを使用して情報を抽出するには、以下の推奨事項に従ってください。

次の表は、抽出タスクのために granite-13b-chat-v2基盤モデルを要求するための推奨モデル パラメータを示しています。

表 4. 抽出タスクでgranite-13b-chat-v2のプロンプトからの推奨モデルパラメータ
パラメーター 推奨値または範囲 説明
デコード 欲張り 貪欲なデコーディングは、最も可能性の高い選択肢のみからトークンを選択するため、テキストを抽出したい場合に最適である。
最大トークン数 状況による 510のように、抽出したい情報タイプの最も長い言及のトークン数をカバーする値を使用します。 トークンを制限することで、モデルが適切なクラスラベルだけを返し、それ以外は返さないようにする。
停止基準 サポートされている各クラスラベルを停止シーケンスとして追加する。 停止シーケンスとしてクラスを追加すると、入力にクラスが割り当てられた後、モデルはテキストの生成を停止します。

 

granite-13b-chat-v2 基盤モデル抽出タスクを実行させるには、以下の手順をお試しください

  1. モデルに入力から抽出させたい情報タイプを特定する。 これらの情報タイプのラベルは、プロンプトの指示セグメントに必ず記載してください。

    例えば、ある企業の米国証券取引委員会(SEC)の10-Kフォームから重要な情報を抽出したい場合、Line Of Credit Facility Maximum Borrowing Capacityのような情報タイプを特定するかもしれません。

  2. モデルに抽出させたい情報のタイプを持つ入力テキストの代表的な例を2つか3つ集める。

  3. プロンプトを構造化できるように、 Prompt Lab の granite-13b-chat-v2基盤モデルをフリーフォーム モードで操作します。

  4. モデルパラメータパネルから、表4から推奨されるモデルパラメータを設定します。

  5. システムプロンプト、ユーザー入力、モデルの出力先を明確にする。

    例えば、 granite-13b-chat-v2 基盤モデルを訓練してテキストから情報を抽出する際には、以下のプロンプト構造が使用されました

    <|system|>
    You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
    <|user|>
    {INSTRUCTION}
    Your response should only include the answer. Do not provide any further explanation.
    Here are some examples, complete the last one:
    {INPUT_LABEL}:
    {ICL_INPUT_1}
    {OUTPUT_LABEL}:
    {ICL_OUTPUT_1}
    {INPUT_LABEL}:
    {ICL_INPUT_2}
    {OUTPUT_LABEL}:
    {ICL_OUTPUT_2}
    {INPUT_LABEL}:
    {TEST_INPUT}
    {OUTPUT_LABEL}:
    <|assistant|>
    
    

    同様の構造を使って、モデルのトレーニングを活用することができる。 プロンプトテンプレートのプレースホルダ変数を置き換えるだけでよい。

    表 4a: 抽出テンプレートのプレースホルダー変数
    プレースホルダ変数 説明
    {INSTRUCTION} タスクの説明。 モデルに入力から抽出させたい情報タイプのリストを含める。
    {INPUT_LABEL} 分類するテキストの短いラベル。
    {OUTPUT_LABEL} 抽出された値を表す短いラベル。
    {ICL_INPUT_N} オプション。 抽出される情報タイプを持つ入力テキストの例。 インコンテクスト学習をサポートするために、数発のプロンプトを使用したい場合は、例を追加します。
    {ICL_OUTPUT_N} 対応する入力から情報タイプを抽出した出力例。

 

抽出プロンプトの例

次のプロンプトは、ある企業の SEC 10-K フォームから Line Of Credit Facility Maximum Borrowing Capacity の値を抽出したものです。

<|system|>
You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.
<|user|>
Extract the Line Of Credit Facility Maximum Borrowing Capacity from the 10K sentences.
Your response should only include the answer. Do not provide any further explanation.
Here are some examples, complete the last one:
10K Sentence:
The credit agreement also provides that up to $500 million in commitments may be used for letters of credit.
Line Of Credit Facility Maximum Borrowing Capacity:
$500M

10K Sentence:
In March 2020, we upsized the Credit Agreement by $100 million, which matures July 2023, to $2.525 billion.
Line Of Credit Facility Maximum Borrowing Capacity:
$2.525B

10K Sentence:
We prepared our impairment test as of October 1, 2022 and determined that the fair values of each of our reporting units exceeded net book value by more than 50%. Among our reporting units, the narrowest difference between the calculated fair value and net book value was in our Principal Markets segment's Canada reporting unit, whose calculated fair value exceeded its net book value by 53%. Future developments related to macroeconomic factors, including increases to the discount rate used, or changes to other inputs and assumptions, including revenue growth, could reduce the fair value of this and/or other reporting units and lead to impairment. There were no goodwill impairment losses recorded for the nine months ended December 31, 2022. Cumulatively, the Company has recorded $469 million in goodwill impairment charges within its former EMEA ($293 million) and current United States ($176 million) reporting units. Revolving Credit Agreement In October 2021, we entered into a $3.15 billion multi-currency revolving credit agreement (the "Revolving Credit Agreement") for our future liquidity needs. The Revolving Credit Agreement expires, unless extended, in October 2026. Interest rates on borrowings under the Revolving Credit Agreement are based on prevailing market interest rates, plus a margin, as further described in the Revolving Credit Agreement. The total expense recorded by the Company for the Revolving Credit Agreement was not material in any of the periods presented. We may voluntarily prepay borrowings under the Revolving Credit Agreement without premium or penalty, subject to customary "breakage" costs. The Revolving Credit Agreement includes certain customary mandatory prepayment provisions. Interest on Debt Interest expense for the three and nine months ended December 31, 2022 was $27 million and $65 million, compared to $18 million and $50 million for the three and nine months ended December 31, 2021. Most of the interest for the pre-Separation period presented in the historical Consolidated Income Statement reflects the allocation of interest expense associated with debt issued by IBM from which a portion of the proceeds benefited Kyndryl.
Line Of Credit Facility Maximum Borrowing Capacity:
<|assistant|>

このプロンプトが送信された際に、 granite-13b-chat-v2 基盤モデルによって生成される出力は、 $3.15B です。

詳細情報

granite-13b-chat-v2 基盤モデルについてさらに詳しく知りたい方は、以下のリソースをご覧ください

Parent topic: IBM Foundation models