Repository navigation
feat: プロンプトテンプレートのセクション構成最適化 - #13
Merged
Merged
Conversation
EarningsPeriod/AccountingStandard/EarningsContext型と detectEarningsContext関数を追加し、決算短信タイトルから 期区分・会計基準・連結/個別を検出できるようにする
IFRS・銀行/保険業の勘定科目(売上収益、事業利益、経常収益、 業務純益等)をセクション検出・ページスコアリング・品質ゲートに追加
- EarningsContextに基づく動的プロンプト生成システムを導入 - 進捗率の対象を「主要利益」から「経常利益」に統一 - 標準進捗率をctx.periodから自動算出しテンプレートに埋め込み - 前年同期進捗率の表示枠を出力テンプレートに追加 - 通期予想が未定/ゼロ/赤字予想時のエッジケースを明示的にハンドリング - 決算評価(★判定)の判定ルール・出力テンプレートを追加 - 四半期/通期・会計基準別に最適なプロンプトを組み立て
detectEarningsContextでタイトルからコンテキストを検出し、 getPromptForDocumentTypeに渡して動的プロンプト生成を有効化
- 全テンプレートを定数ベースから関数ベース(buildXxxPrompt)に移行
- getPromptForDocumentType の戻り値を string → { system, user } に変更
- Background Script の呼び出し側を system/user 分離に対応
- COMMON_RULES に出力形式ルールを追加
- 決算評価を経常利益ベースに一本化(対前年/進捗or着地/予想修正or配当)
- 評価テンプレートを【実績】/【通期予想 or 来期予想】2グループ構造に再設計
- プレースホルダを [...] → {...} に統一
- COMMON_TOPICS_RULESに投資判断の着眼点を追加 (セグメント傾向、一時要因、先行指標、変化点/サプライズ) - earnings: 修正・配当セクションを統合、全体要約を決算評価直後に移動 - earningsRevision: 有/無セクション削除、全体要約を先頭に移動 - dividend: 配当内容と変更を統合、全体要約を先頭に移動 - ma: スケジュール・連結範囲を統合、全体要約を先頭に移動 - shareRepurchase: 消却予定を取得内容に統合、全体要約を先頭に移動 - other: 対象範囲を開示内容に統合、その他重要事項を削除、全体要約を先頭に移動 - 有/無パターンの修正(省略ルールとの整合性確保)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getPromptForDocumentTypeの戻り値を{ system, user }に分離COMMON_TOPICS_RULESに投資判断の着眼点を追加Changes
コミット1:
refactor: プロンプト構造の改善XXX_PROMPT)→ 関数(buildXxxPrompt())に移行getPromptForDocumentTypeの戻り値をstring→{ system, user }に変更COMMON_RULESに出力形式ルールを追加、プレースホルダを[...]→{...}に統一コミット2:
feat: セクション構成の最適化COMMON_TOPICS_RULESに投資判断の着眼点4項目を追加Test plan
npm run type-check— 型エラーなしnpm run build— ビルド成功