SuperAPI AI Directory

initiation-of-coverage-or-deep-dive

Writing & research

View repository

Updated 10-16 10:45

About this skill

Listed company initiation of coverage report / in-depth research report generation

Overview

This skill is used to generate a listed company'sinitiation of coverage reportorin-depth research report. By calling the unified script scripts/generate_deep_research_report.py, complete entity recognition, market verification, report generation, and result return in one go.

Environment variables

Variable name Description Default
INITIATION_OF_COVERAGE_OR_DEEP_DIVE_OUTPUT_DIR Attachment output directory ./miaoxiang/initiation_of_coverage_or_deep_dive(relative to the current working directory)

Complete workflow

Step 1: Call the report generation script

Call the scripts/generate_deep_research_report.py script and pass the user'soriginal questionas a parameter. The script internally automatically completes all of the following processes:

  1. Entity recognition and market verification: Call the entity recognition interface to identify Shanghai, Shenzhen, Beijing, Hong Kong, and U.S. entities from the user's question and return standardized information (secuCode、marketChar、classCode、secuName); when there are multiple entities, take the first one; if no supported entity is recognized, directly return an error message.
  2. Report generation: Use the verified entity information as a parameter and call the initiation of coverage writing interface to generate a complete report.

How to call:

python3 {baseDir}/scripts/generate_deep_research_report.py --query "用户原始问句"

Script output (JSON format):

  • On success: Return complete results including the full report text and attachment address, including the report title, content of each chapter, attachment address, share link, etc.
  • When entity recognition is empty: Return error message "目前仅支持沪深京港美实体进行首次覆盖。您提供的实体不在支持范围内,请确认后重新输入。"
  • When the input parameters are invalid: Return "入参不支持,请重新检查实体类型和报告期。"
  • When the interface call fails/times out: Return "报告生成服务暂时不可用,请稍后重试。"

Processing logic:

  • The script returns success → enter step 2 and perform structured output
  • The script returns an error message → return the error message to the user as is, and the process terminates

Note:It is prohibited to run this script in any "background execution, report later" manner, and you can only wait synchronously in the current session until the command is completed, and continue only after obtaining the stdout result; otherwise, this Skill will fail.

Step 2: Structured output

After the script returns the full report text, respond according to the following fixed structure.


Output format specification

After the interface returns, you must strictly output according to the following template, and must not add or remove titles, change the order, or add additional chapters:

Title

Directly use the title field returned by the interface, on a separate line, generally in the format "XXX Company Initiation of Coverage Report: XXXXXX".

Body

If the content field returned by the interface contains relevant industry report information, pass it through as is; otherwise, read the content of the attachment file returned by the interface, summarize the relevant report information and return it, and remember to ensure that the returned body content is non-empty.

Attachment

The interface returns the save paths of PDF and DOCX format files.

Share link

Directly use the shareUrl field returned by the interface, on a separate line.

The copy must be output in the following fixed format:

{title}

{content}

---

**附件:**

- 📄 **PDF版完整报告地址**:{pdf_file_path}
- 📝 **Word版完整报告地址**:{word_file_path}

**分享链接:**
{shareUrl}

Field mapping rules:

  • {title} = returned by the script title
  • {content} = returned by the script content
  • {pdf_file_path} = returned by the script pdf_file_path
  • {word_file_path} = returned by the script word_file_path
  • {shareUrl} = returned by the script shareUrl

When attachments are missing:

  • If only one format exists, output only the line that exists (PDF or DOCX).
  • If neither exists, output:完整报告:暂无可用附件

Format requirements

Mathematical formula format specifications in the response event stream:

  • Inline formulas: use the \(...\) format (do not use $...$)
  • Display formulas: uniformly use the \[...\] format
  • The content inside display formula blocks remains unchanged

Language and punctuation specifications

  • If the user asks in Chinese, reply in Chinese throughout, and use standard Chinese punctuation (,。、;:""''!?)
  • If the user asks in English or another language, reply in the corresponding language
  • Proper nouns (such as company English names and financial term abbreviations) may be kept in their original form

Boundaries and exception handling

Scenario Handling method
The user did not provide a company name/code Politely ask: "Please provide the name or stock code of the listed company you want to cover."
The script returns empty entity recognition Return as-is: "Currently, first coverage is only supported for entities in Shanghai, Shenzhen, Beijing, Hong Kong, and the U.S. The entity you provided is not within the supported scope. Please confirm and re-enter."
The script returns invalid input parameters Return as-is: "The input parameters are not supported. Please recheck the entity type and reporting period."
The script returns API call failure/timeout Return as-is: "The report generation service is temporarily unavailable. Please try again later."
The data returned by the interface is missing the summary section Mark at the summary position: "(Summary section data is temporarily unavailable. Please refer to the complete report in the attachment.)"
The user requests to see the complete main text Guide the user to download the attachment: "For the complete main text, please see the PDF or Word version of the report in the attachment."

Distinction from other skills

  • First coverage/in-depth research report(this skill): conduct comprehensive and systematic first coverage or in-depth research on a company, and produce a complete report
  • Earnings review: provide a brief review of a certain financial report release; this is not within the scope of this skill
  • Event review: provide a review of the impact of a certain sudden event on the company; this is not within the scope of this skill
  • Industry report: conduct research on a certain industry; this is not within the scope of this skill

If the user's need belongs to earnings review, event review, or industry report, guide them to the corresponding skill and do not handle it within this skill.


Script/file description

Script/file Function
scripts/generate_deep_research_report.py Unified script: entity recognition, market validation, and calling the first coverage writing interface to generate a report, completed in one step