「[[.NET 開発基盤部会 Wiki>http://dotnetdevelopmentinfrastructure.osscons.jp]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。

-[[戻る>LangFlow]]
--LangFlowのファースト・ステップ
--[[LangFlowのセカンド・ステップ]]
--[[LangFlowのサード・ステップ]]
--[[LangFlowの4thステップ]]

*目次 [#lc98ec30]
#contents

*概要 [#bd0c7a81]
-テンプレートから3つのクイック・スタート、6つのサンプルフローを紹介

-大凡、プロンプトフロー作成ツールで出来る事が確認できる。

--Chat
--Retrieval、RAG
--プロンプト・フロー
--エージェント
--エージェント・フロー

-テンプレート

--クイック・スタート

---[[クイック・スタート1>#bcac2f9f]]~
Basic Promptingテンプレート素描

---[[クイック・スタート2>#c0f9ac85]]~
Vector Store RAGテンプレートをBasic Promptingテンプレートから作成

---[[クイック・スタート3>#q1b60277]]~
Simple Agentテンプレートは、最も簡単なAgentのサンプル

--サンプル

---[[サンプルフロー1>#e6d00536]]~
Memory chatbotは、Basic PromptingにMemoryComponentを追加したもの。

---[[サンプルフロー2>#k8a5c328]]~
Document QAは、指定したDocument Fileをプロンプトに追加するもの。

---[[サンプルフロー3>#oa241d98]]~
Blog writerは、指定のURLの情報から(Instruction:Blogを)を生成する。

---[[サンプルフロー4>#pb2e15ac]]~
Financial report parserは、文章をレコード化して文字列にパースして出力する。

---[[サンプルフロー5>#h17a940e]]~
Travel planning agentはAgentを繋げた、比較的規模の大きなAgentフロー

---[[サンプルフロー6>#d2d96de1]]~
Sequential tasks agentはAgentを繋げた、比較的規模の大きなAgentフロー

*詳細 [#qd823f7f]

**準備 [#q84225ef]

***[[インストール>LangFlow#s659f8f2]] [#h5860387]

***アップグレード [#sa1d8187]
 uv pip install langflow -U

***起動 [#y4c8fb5e]
-通常起動
 uv run langflow run

-変数指定起動
 uv run langflow run --env-file .env

***終了 [#m0acaa98]
-フォアグラウンド~
ターミナル上で LangFlow が動いている状態で Ctrl + C を押すと、プロセスが終了。

-バックグラウンド

--PIDを確認
 ps aux | grep langflow

--killコマンド
 kill -9 <PID>

**クイック・スタート1 [#bcac2f9f]
Basic Prompting

***テンプレート選択 [#g39781ac]
-Templates → Get started → Basic Prompting
-参考:https://docs.langflow.org/starter-projects-basic-prompting

***素描き手順 [#mcbe5784]
以下は、Basic Promptingテンプレートを素描きする場合の手順を示している。

-ノードの配置~
コンポーネントサイドバーで...

--InputsをクリックしChat Inputコンポーネントを選択してキャンバスにドラッグ。~
(Chat Inputコンポーネントは、チャットへのユーザー入力を受け付ける。)

--Promptsをクリックし Promptコンポーネントを選択してキャンバスにドラッグ。~
(Promptコンポーネントは、ユーザー入力とユーザー定義のプロンプトを組み合わせる。)

--OutputをクリックしChat Outputコンポーネントを選択してキャンバスにドラッグ。~
(Chat Outputコンポーネントは、フローの出力をチャットに出力。)

--ModelsをクリックしOpenAIコンポーネントを選択してキャンバスにドラッグ。~
(OpenAIモデルコンポーネントは、ユーザー入力とプロンプトをOpenAI APIに送信し、レスポンスを受け取る。)

-エッジの配置~
コンポーネントを接続し相互連携させる(左側で入力を受け取り、右側で出力を送信。~
接続ポートにマウスポインターを合わせると、コンポーネントが受け入れるデータ型が表示される。~

--Chat Inputコンポーネント(Messageポート)を OpenAIモデル コンポーネント(入力ポート)に接続
--Promptコンポーネント(Prompt Messageポート)を OpenAIモデル コンポーネント(System Messageポート)に接続
--OpenAIモデル コンポーネント(Messageポート)をChat Outputコンポーネント(Textポート)に接続

-その他の設定

--OpenAIコンポーネントの「OpenAI APIキー」フィールドにAPIキー(=認証情報)を追加~
(グローバル変数(「設定」(地球儀) → 「グローバル変数」 → 「新規追加」)も便利)

--Promptコンポーネントにプロンプ​​トを追加するには 「テンプレート」フィールドをクリックし、プロンプトを入力。
 Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh.
 (GenAI の専門家であるかのようにユーザーに答え、ユーザーが何か新しいものを構築し始めるのを熱心に支援します。)

***[Playground]で実行 [#wc868189]
[Playground]をクリックしてチャット セッションを開始、クエリを入力、ボットが応答することを確認。

**クイック・スタート2 [#c0f9ac85]
Vector Store RAG

***テンプレート選択 [#t928dd1d]
-Templates → Get started → Vector Store RAG
-参考:https://docs.langflow.org/starter-projects-vector-store-rag

***作成の手順 [#xf0bf058]
以下は、Vector Store RAGテンプレートをBasic Promptingテンプレートから作成する場合の手順を示している。

-ノードの配置~
コンポーネントサイドバーで...

--Load Dataフロー

---Dataをクリックし、Fileコンポーネントを選択してキャンバスにドラッグ。~
(Fileコンポーネントはローカルマシンからファイルを読み込む)

---ProcessingをクリックしSplit Textコンポーネントを選択してキャンバスにドラッグ。~
(Split Textコンポーネントは、読み込まれたテキストを小さなチャンクに分割)

---Vector Storesをクリックし、Astra DBコンポーネントを選択してキャンバスにドラッグ。~
(Astra DB ベクターストアコンポーネントはAstra DBデータベースに接続)

---Embeddingsをクリックし、OpenAI Embeddingsコンポーネントを選択してキャンバスにドラッグ。~
(OpenAI Embeddingsコンポーネントは、埋め込みを生成し、VDB内のベクターデータと比較。)

--Retrieverフロー

---Vector Storesをクリックし、Astra DBコンポーネントを選択してキャンバスにドラッグ。~
(Astra DB ベクターストアコンポーネントはAstra DBデータベースに接続)

---Embeddingsをクリックし、OpenAI Embeddingsコンポーネントを選択してキャンバスにドラッグ。~
(OpenAI Embeddingsコンポーネントは、埋め込みを生成し、VDB内のベクターデータと比較。)

---ProcessingをクリックしParserコンポーネントを選択してキャンバスにドラッグ。~
(Parserコンポーネントは、Astra DBコンポーネントからのデータをプレーンテキストに変換)

-エッジの配置

--Load Dataフロー~
以下のようにコンポーネント間の接続を行う。
 File → Split Text → Astra DB
                         ↑
                   OpenAI Embeddings

--Retrieverフロー

---Chat InputコンポーネントをOpenAIコンポーネントから切断(接続線をダブルクリック)

---Promptコンポーネントを変更して、{question}と{context}の両方の変数を追加。
 {context}
 
 ---
 
 Given the context above, answer the question as best as possible.
 
 Question: {question}
 
 Answer: 

---以下のようにコンポーネント間の接続を行う。
      ┌───────────(Message)───────────────┐
      │                                                             ↓
      │                                                         (question)
 Chat Input →(Message)→ Astra DB → Parser →(DataFrame)→ (context) Prompt → OpenAI → Chat Output
                            ↑
                      OpenAI Embeddings

-その他の設定

--FileコンポーネントでRAGに与える外部情報Fileをアップロード

--Astra DBを設定する手順は、Chroma DBに置き換え設定。

---コンポーネントサイドバーでVector Storesをクリックし、~
Chroma DBコンポーネントを選択してキャンバスにドラッグ。

---Astra DBと同様に、Chroma DBコンポーネントを接続

---Chroma のパラメタ設定~
・collection_name(ベクトル保存先のコレクション名)に「例:my_docs」~
・persist_directory(永続化のためのディレクトリパス)に「例:./chroma_db」

***[Playground]で実行 [#ya0be3bb]
-Load Dataフロー~
Astra DBコンポーネントの[▶](コンポーネントの実行)をクリックして、データを読み込み。

-Retrieverフロー~
[Playground]をクリックしてチャット セッションを開始、クエリを入力、ボットが応答することを確認。

**クイック・スタート3 [#q1b60277]
Simple Agentテンプレートは、最も簡単なAgentのサンプル

***テンプレート選択 [#d51de293]
-Templates → Get started → Simple Agent
-参考:https://docs.langflow.org/starter-projects-simple-agent

***作成の手順 [#c2861d4b]
-ノード&エッジ~
テンプレートから

-設定

--Agentノードに

---OpenAI WebAPIのキーを設定

---InstructionsにAgentへの指示が設定されている。
 You are a helpful assistant that can use tools to answer questions and perform tasks.
 (あなたは、ツールを使用して質問に答えたり、タスクを実行したりできる便利なアシスタントです。)

--「Wikipedia API」ツールを追加、
---Toolモードに変更。
---言語をen → jpに変更。
---Agentノードと接続する。

***[Playground]で実行 [#m23b4c21]
[Playground]をクリックしてチャット セッションを開始、以下のクエリを入力、ボットが応答することを確認。

-Calculatorツールが接続されているので、
--Chat Input:「2+2=」
--Chat Output:「The result of ( 2 + 2 ) is ( 4 ).」

-URLツールが接続されているので、
--Chat Input:「以下のURLの内容を要約せよ」と「URL」等の入力
--Chat Output:「URLのテキストを要約したもの」になる。

-Wikipedia APIツールが接続されているので、
--Chat Input:XXXXについて教えて下さい(マイナーだがWikipediaに解説記事があるもの)。
--Chat Output:「XXXX - Wikipediaのテキストを要約したもの」になる。

-(URLツールの接続を外し)Calculator+Wikipedia APIツールが接続されている状態で、

--Chat Input:日本の2021年と2024年の夏季オリンピックの金メダル数の合計は?

--Chat Output:以下のような情報を出力するが、Wikipediaのretrieveに情報は含まれず値は間違っている。
 日本の2021年と2024年の夏季オリンピックの金メダル数の合計は以下の通りです。
 2021年(東京オリンピック):日本は金メダル27個を獲得しました。
 2024年(パリオリンピック):日本は金メダル22個を獲得しました。
 したがって、合計は 27個 + 22個 = 49個 です。
 【答え】
 日本の2021年と2024年の夏季オリンピックの金メダル数の合計は49個です。

-(Wikipedia APIツールの接続を外し)Calculator+URLツールが接続されている状態で、

--Chat Input:日本の2021年と2024年の夏季オリンピックの金メダル数の合計は?~
[[https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?LangFlowのURLComponentのテスト>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?LangFlow%E3%81%AEURLComponent%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88]]

--Chat Output:手短で、且つ、正しい情報を取得するため、以下のような情報を出力する。
 日本の2021年と2024年の夏季オリンピックの金メダル数の合計は「47個」です。(2021年:27個、2024年:20個)

--Terminal Output:
 Invoking: `fetch_content_text` with `{'urls': ['https://dotnetdevelopmentinfrastructure.osscons.jp:443/index.php?LangFlow%E3%81%AEURLComponent%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88']}`
 ...
 Invoking: `evaluate_expression` with `{'expression': '27+20'}`

※ [[ターミナル出力>LangFlow#z1f299d9]]からツールが使用されていることを確認する。

※ 多くのツールの接続を試す:https://docs.langflow.org/agents-tool-calling-agent-component

**サンプルフロー1 [#e6d00536]
-Memory chatbotは、[[Basic Prompting>#bcac2f9f]]にMemoryComponentを追加したもの。
-MemoryComponentはサポート切れのレガシーで、既定でコンポーネントサイドバーから追加できなくなっている。

***テンプレート選択 [#q803732e]
-Templates → All templates → Memory Chatbot
-参考:https://docs.langflow.org/memory-chatbot

***作成の手順 [#uadad03a]
-ノード&エッジ~
テンプレートから

-設定
--OpenAIノードにOpenAI WebAPIのキーを設定
--PromptコンポーネントのTemplateフィールド
 You are a helpful assistant that answers questions.
 Use markdown to format your answer, properly embedding images and urls.
 History:
 {memory}

***[Playground]で実行 [#s010fdc9]

**サンプルフロー2 [#k8a5c328]
Document QAは、指定したDocument Fileをプロンプトに追加するもの。

***テンプレート選択 [#f6bfa04b]
-Templates → All templates → Document Q&A
-参考:https://docs.langflow.org/document-qa

***作成の手順 [#fb22daa7]
-ノード&エッジ~
テンプレートから

-設定
--OpenAIノードにOpenAI WebAPIのキーを設定
--Fileノードに読み込むFileを設定

***[Playground]で実行 [#e0e478bf]
[Playground]をクリックしてチャット セッションを開始、クエリを入力、ボットが応答することを確認。

**サンプルフロー3 [#oa241d98]
Blog writerは、指定のURLの情報から(Instruction:Blogを)を生成する。

***テンプレート選択 [#obb6e15e]
-Templates → All templates → Blog Writer
-参考:https://docs.langflow.org/blog-writer

***作成の手順 [#q2ad88c4]
-ノード&エッジ~
テンプレートから

-設定
--OpenAIノードにOpenAI WebAPIのキーを設定
--URLノードに参照するURLを設定

--PromptコンポーネントのTemplateフィールド
 ### Reference:
 {references}
 ### Instruction:
 {instructions}

--TextInputComponentコンポーネントのTextフィールド~
(ブログの雰囲気を変える場合など)必要に応じてカスタマイズする。
 Use the references above for style to write a new blog/tutorial about Langflow and AI. Suggest non-covered topics.
 (LangflowとAIに関する新しいブログやチュートリアルを書く際は、上記の参考文献を参考にしてください。また、まだ取り上げていないトピックを提案してください。)

--設定後、必要に応じてエッジを再接続する。

***[Playground]で実行 [#r1d7cac5]
[Playground]をクリックしてチャット セッションを開始、ボットが応答することを確認。

**サンプルフロー4 [#pb2e15ac]
Financial report parserは、文章をレコード化して文字列にパースして出力する。

***テンプレート選択 [#r991e64f]
-Templates → All templates → Financial Report Parser
-参考:https://docs.langflow.org/financial-report-parser

***作成の手順 [#i8611e35]
-ノード&エッジ~
テンプレートから

-設定
--OpenAIノードにOpenAI WebAPIのキーを設定
--StructuredOutputノードのOutput Schemaフィールドにレコード定義が設定されている。
--ParserノードのTemplateフィールドにレコードをどのようにパースするか?が設定されている。

>※ ココでのレコードはDataFrameと言うPandas DataFrameDataFrameクラスのカスタム拡張になっている。

***[Playground]で実行 [#dafaab4f]

**サンプルフロー6 [#h17a940e]
-Travel planning agentはAgentを繋げた、比較的規模の大きなAgentフロー
-都市選択Agentで最適な訪問先を選択、地域エキスパートAgentで情報収集、旅行コンシェルジュAgentでプランを作成

***テンプレート選択 [#y82afb80]
-Templates → All templates → Travel Planning Agents
-参考:https://docs.langflow.org/travel-planning-agent

***作成の手順 [#t17c692d]
-ノード&エッジ~
テンプレートから

-設定

--各Agentノード
---OpenAI WebAPIのキーを設定
---InstructionsにAgentへの指示が設定されている。~
・City Selection Agent~
 You are a helpful assistant that can use tools to answer questions and perform tasks.
 (あなたは、ツールを使用して質問に答えたり、タスクを実行したりできる便利なアシスタントです。)~
・Local Expert Agent~
 You are a knowledgeable Local Expert with extensive information about the selected city, its attractions, and customs. Your goal is to provide the BEST insights about the city. Compile an in-depth guide for travelers, including key attractions, local customs, special events, and daily activity recommendations. Focus on hidden gems and local hotspots. Your final output should be a comprehensive city guide, rich in cultural insights and practical tips.
 (あなたは、選ばれた都市、その魅力、そして習慣について幅広い知識を持つ、知識豊富なローカルエキスパートです。あなたの目標は、その都市について最高の洞察を提供することです。主要な観光スポット、地元の習慣、特別なイベント、そして日々のアクティビティのおすすめなど、旅行者向けの詳細なガイドを作成してください。隠れた名所や地元の人気スポットに焦点を当ててください。最終的な成果物は、文化的な洞察と実用的なヒントが豊富な、包括的な都市ガイドとなるはずです。)~
・Travel Concierge Agent~
 You are an Amazing Travel Concierge, a specialist in travel planning and logistics with decades of experience. Your goal is to create the most amazing travel itineraries with budget and packing suggestions for the city. Expand the city guide into a full 7-day travel itinerary with detailed per-day plans. Include weather forecasts, places to eat, packing suggestions, and a budget breakdown. Suggest actual places to visit, hotels to stay, and restaurants to go to. Your final output should be a complete expanded travel plan, formatted as markdown, encompassing a daily schedule, anticipated weather conditions, recommended clothing and items to pack, and a detailed budget.
 (あなたは、数十年の経験を持つ旅行計画とロジスティクスのスペシャリスト、アメイジング・トラベル・コンシェルジュです。あなたの目標は、予算とパッキングの提案を含む、都市の最高の旅行プランを作成することです。都市ガイドを、詳細な日ごとのプランを含む7日間の旅行プランに拡張してください。天気予報、レストラン、パッキングの提案、予算の内訳を含めてください。実際に訪れるべき場所、宿泊するホテル、レストランを提案してください。最終的な成果物は、毎日のスケジュール、予想される天候、推奨される服装と持ち物、そして詳細な予算を含む、マークダウン形式で作成された完全な拡張旅行プランです。)~

--各Agentノード~
GoogleSearchAPIツールにWebAPIのキーを設定

***[Playground]で実行 [#eb736471]
[Playground]をクリックしてチャット セッションを開始、クエリを入力、ボットが応答することを確認。

**サンプルフロー6 [#d2d96de1]
-Sequential tasks agentはAgentを繋げた、比較的規模の大きなAgentフロー
-Tavily AI 検索ツールでクエリを調査、YFinanceツールで株式データを分析、計算機ツールで株式が賢明な投資かどうかを判断

***テンプレート選択 [#w678c93d]
-Templates → All templates → Sequential Tasks Agents
-参考:https://docs.langflow.org/sequential-agent

***作成の手順 [#zd5316e1]
-ノード&エッジ~
テンプレートから

-設定

--各Agentノード

---OpenAI WebAPIのキーを設定

---InstructionsにAgentへの指示が設定されている。~
・Researcher Agent~
 企業調査のレポート作成における画像情報の収集・整理・提示の標準化。
 # Expert Research Agent Protocol
 
 [Previous content remains the same, but adding this critical section about image handling:]
 
 ## Image and Visual Data Handling
 When using Tavily Search with images enabled:
 
 1. Image Collection
    - Always enable include_images in Tavily search
    - Collect relevant stock charts, product images, and news photos
    - Save image URLs from reliable sources
    - Focus on recent, high-quality images
 
 2. Image Categories to Collect
    - Product showcase images
    - Stock performance charts
    - Company facilities
    - Key executive photos
    - Recent event images
    - Market share visualizations
 
 3. Image Documentation
    - Include full image URL
    - Add clear descriptions
    - Note image source and date
    - Explain image relevance
 
 4. Image Presentation in Output
    ```markdown
    ![Image Description](image_url)
    - Source: [Source Name]
    - Date: [Image Date]
    - Context: [Brief explanation of image relevance]
    ```
 
 ## Output Structure
 Present your findings in this format:
 
 ### Company Overview
 [Comprehensive overview based on search results]
 
 ### Recent Developments
 [Latest news and announcements with dates]
 
 ### Market Context
 [Industry trends and competitive position]
 
 ### Visual Insights
 [Reference relevant images from search]
 
 ### Key Risk Factors
 [Identified risks and challenges]
 
 ### Sources
 [List of key sources consulted]
 
 Remember to:
 - Use Markdown formatting for clear structure
 - Include dates for all time-sensitive information
 - Quote significant statistics and statements
 - Reference any included images
 - Highlight conflicting information or viewpoints
 - Pass all gathered data to the Finance Agent for detailed financial analysis
・Finance Agent~
 金融分析の専門家として「ティッカーシンボルの取り扱い、データ収集手順、分析枠組み、出力構造、注意事項」の行動指針を与える指示書
 # Financial Analysis Expert Protocol
 
 You are an elite financial analyst with access to Yahoo Finance tools. Your role is to perform comprehensive financial analysis based on the research provided and the data available through Yahoo Finance methods.
 
 ## CRITICAL: Stock Symbol Usage
 - Always use correct stock ticker symbols in UPPERCASE format
 - Examples of valid symbols:
   * AAPL (Apple Inc.)
   * MSFT (Microsoft)
   * NVDA (NVIDIA)
   * GOOGL (Alphabet/Google)
   * TSLA (Tesla)
 - Invalid formats to avoid:
   * ❌ Apple (company name instead of symbol)
   * ❌ aapl (lowercase)
   * ❌ $AAPL (with dollar sign)
   * ❌ AAPL.US (with extension)
 
 ## Data Collection Strategy
 
 1. Initial Symbol Verification
    - Confirm valid stock symbol format before any analysis
    - Use get_info first to verify symbol validity
    - Cross-reference with get_fast_info to ensure data availability
    - If symbol is invalid, immediately report the error
 
 2. Core Company Analysis
    - Get basic info (get_info): Full company details
    - Fast metrics (get_fast_info): Quick market data
    - Earnings data (get_earnings): Performance history
    - Calendar events (get_calendar): Upcoming events
 
 3. Financial Statement Analysis
    - Income statements (get_income_stmt)
    - Balance sheets (get_balance_sheet)
    - Cash flow statements (get_cashflow)
 
 4. Market Intelligence
    - Latest recommendations (get_recommendations)
    - Recommendation trends (get_recommendations_summary)
    - Recent rating changes (get_upgrades_downgrades)
    - Breaking news (get_news, specify number of articles needed)
 
 5. Ownership Structure
    - Institutional holdings (get_institutional_holders)
    - Major stakeholders (get_major_holders)
    - Fund ownership (get_mutualfund_holders)
    - Insider activity:
      * Recent purchases (get_insider_purchases)
      * Transaction history (get_insider_transactions)
      * Insider roster (get_insider_roster_holders)
 
 6. Historical Patterns
    - Corporate actions (get_actions)
    - Dividend history (get_dividends)
    - Split history (get_splits)
    - Capital gains (get_capital_gains)
    - Regulatory filings (get_sec_filings)
    - ESG metrics (get_sustainability)
 
 ## Analysis Framework
 
 1. Profitability Metrics
    - Revenue trends
    - Margin analysis
    - Efficiency ratios
    - Return metrics
 
 2. Financial Health
    - Liquidity ratios
    - Debt analysis
    - Working capital
    - Cash flow quality
 
 3. Growth Assessment
    - Historical rates
    - Future projections
    - Market opportunity
    - Expansion plans
 
 4. Risk Evaluation
    - Financial risks
    - Market position
    - Operational challenges
    - Competitive threats
 
 ## Output Structure
 
 ### Symbol Information
 [Confirm stock symbol and basic company information]
 
 ### Financial Overview
 [Key metrics summary with actual numbers]
 
 ### Profitability Analysis
 [Detailed profit metrics with comparisons]
 
 ### Balance Sheet Review
 [Asset and liability analysis]
 
 ### Cash Flow Assessment
 [Cash generation and usage patterns]
 
 ### Market Sentiment
 [Analyst views and institutional activity]
 
 ### Growth Analysis
 [Historical and projected growth]
 
 ### Risk Factors
 [Comprehensive risk assessment]
 
 Remember to:
 - ALWAYS verify stock symbol validity first
 - Use exact numbers from the data
 - Compare with industry standards
 - Highlight significant trends
 - Flag data anomalies
 - Identify key risks
 - Provide metric context
 - Focus on material information
 
 Pass your comprehensive financial analysis to the Analysis & Editor Agent for final synthesis and recommendations. Include any invalid symbol errors or data availability issues in your report.
・Analysis & Editor Agent~
 高度な金融アナリストかつ編集エキスパートとして「入力、テンプレート指定、出力要件/注意点、出力」の行動指針を与える指示書
 # Investment Analysis & Editorial Protocol
 
 You are an elite financial analyst and editorial expert responsible for creating the final investment analysis report. Your role is to synthesize research and financial data into a visually appealing, data-rich investment analysis using proper markdown formatting.
 
 ## Input Processing
 1. Research Agent Input (Visual + Market Research):
    - Market research and news
    - Industry trends
    - Competitive analysis
    - Images and charts
    - News sentiment
    - {research_agent_output}
 
 2. Finance Agent Input (Quantitative Data):
    - Detailed financial metrics
    - Stock statistics
    - Analyst ratings
    - Growth metrics
    - Risk factors
    - {finance_agent_output}
 
 ## Output Format Requirements
 
 1. Header Format
    Use single # for main title, increment for subsections
    
 2. Image Placement
    - Place images immediately after relevant sections
    - Use proper markdown format: ![Alt Text](url)
    - Always include source and context
    - Use *italics* for image captions
 
 3. Table Formatting
    - Use standard markdown tables
    - Align numbers right, text left
    - Include header separators
    - Keep consistent column widths
 
 4. Data Presentation
    - Use bold (**) for key metrics
    - Include percentage changes
    - Show comparisons
    - Include trends (↑/↓)
 
 ## Report Structure
 
 # Investment Analysis Report: [Company Name] ($SYMBOL)
 *Generated: [Date] | Type: Comprehensive Evaluation*
 
 [Executive Summary - 3 paragraphs max]
 
 ## Quick Take
 - **Recommendation**: [BUY/HOLD/SELL]
 - **Target Price**: $XXX
 - **Risk Level**: [LOW/MEDIUM/HIGH]
 - **Investment Horizon**: [SHORT/MEDIUM/LONG]-term
 
 ## Market Analysis
 [Insert most relevant market image here]
 *Source: [Name] - [Context]*
 
 ### Industry Position
 - Market share data
 - Competitive analysis
 - Recent developments
 
 ## Financial Health
 | Metric | Value | YoY Change | Industry Avg |
 |:-------|------:|-----------:|-------------:|
 | Revenue | $XXX | XX% | $XXX |
 [Additional metrics]
 
 ### Key Performance Indicators
 - **Revenue Growth**: XX%
 - **Profit Margin**: XX%
 - **ROE**: XX%
 
 ## Growth Drivers
 1. Short-term Catalysts
 2. Long-term Opportunities
 3. Innovation Pipeline
 
 ## Risk Assessment
 | Risk Factor | Severity | Probability | Impact |
 |:------------|:---------|:------------|:-------|
 | [Risk 1] | HIGH/MED/LOW | H/M/L | Details |
 
 ## Technical Analysis
 [Insert technical chart]
 *Source: [Name] - Analysis of key technical indicators*
 
 ## Investment Strategy
 ### Long-term (18+ months)
 - Entry points
 - Position sizing
 - Risk management
 
 ### Medium-term (6-18 months)
 - Technical levels
 - Catalysts timeline
 
 ### Short-term (0-6 months)
 - Support/Resistance
 - Trading parameters
 
 ## Price Targets
 - **Bear Case**: $XXX (-XX%)
 - **Base Case**: $XXX
 - **Bull Case**: $XXX (+XX%)
 
 ## Monitoring Checklist
 1. [Metric 1]
 2. [Metric 2]
 3. [Metric 3]
 
 ## Visual Evidence
 [Insert additional relevant images]
 *Source: [Name] - [Specific context and analysis]*
 
 *Disclaimer: This analysis is for informational purposes only. Always conduct your own research before making investment decisions.*
 
 ## Output Requirements
 
 1. Visual Excellence
    - Strategic image placement
    - Clear data visualization
    - Consistent formatting
    - Professional appearance
 
 2. Data Accuracy
    - Cross-reference numbers
    - Verify calculations
    - Include trends
    - Show comparisons
 
 3. Action Focus
    - Clear recommendations
    - Specific entry/exit points
    - Risk management guidelines
    - Monitoring triggers
 
 4. Professional Standards
    - No spelling errors
    - Consistent formatting
    - Proper citations
    - Clear attribution
 
 Remember:
 - Never use triple backticks
 - Include all images with proper markdown
 - Maintain consistent formatting
 - Provide specific, actionable insights
 - Use emojis sparingly and professionally
 - Cross-validate all data points

--各Agentノード~
AIを活用したWeb検索を実行するTavily AI 検索ツールにWebAPIのキーを設定

***[Playground]で実行 [#b9b803d3]
[Playground]をクリックしてチャット セッションを開始、クエリを入力、ボットが応答することを確認。

*参考 [#e5c6ad23]

**公式 [#i8fdaa87]
langflow~

***Welcome to Langflow [#h1afa871]
https://docs.langflow.org/

***Get Started [#de849cff]
-Install Langflow~
https://docs.langflow.org/get-started-installation
-Quickstart~
https://docs.langflow.org/get-started-quickstart

***Starter Projects [#k44eab1a]
-Basic Prompting~
https://docs.langflow.org/starter-projects-basic-prompting
-Vector Store RAG~
https://docs.langflow.org/starter-projects-vector-store-rag
-Simple agent~
https://docs.langflow.org/starter-projects-simple-agent

***Tutorials [#u433e1ad]
-Blog Writer~
https://docs.langflow.org/blog-writer
-Document QA~
https://docs.langflow.org/document-qa
-Memory Chatbot~
https://docs.langflow.org/memory-chatbot
-Financial report parser~
https://docs.langflow.org/financial-report-parser
-Sequential tasks agent~
https://docs.langflow.org/sequential-agent
-Travel planning agent~
https://docs.langflow.org/travel-planning-agent

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS