How the Investment-Research Skill Enforces A/B/C Information Richness Ratings
The investment-research skill enforces A/B/C information richness ratings by embedding a three-tier classification table directly in its workflow template, mandating that analysts declare the rating upfront, and validating compliance through both bias checklists and automated audit scripts.
The ai-berkshire repository implements a rigorous equity research framework that requires analysts to classify target companies based on data availability before conducting analysis. According to the source code in skills/investment-research.md, this rating system is not merely advisory—it is structurally enforced through explicit prompts, contextual guidance, and automated validation gates.
The A/B/C Rating Framework
The workflow definition in skills/investment-research.md (lines 13–19) presents a three-row table that classifies targets as A-level, B-level, or C-level based on the quantity and quality of publicly available information. This classification determines how the analyst must handle data gaps, confidence intervals, and verification requirements throughout the research process.
- A-level: Abundant public disclosures with high reliability
- B-level: Moderate data availability requiring explicit confidence labeling
- C-level: Scarce public data necessitating first-principles reasoning and on-site verification
Four Enforcement Mechanisms
The skill employs a multi-layered approach to ensure analysts actually apply the appropriate rating standards rather than bypassing them.
1. Mandatory Rating Declaration
At the start of the research workflow, the template explicitly instructs: “将信息丰富度评级结果写入报告开头” (write the rating result at the beginning of the report) [source: line 33]. This forced declaration prevents analysts from proceeding with generic research without first assessing data availability. The rating must appear in the generated markdown before any analytical content.
2. Level-Specific Guidance and Mitigations
Each rating tier includes specific operational constraints defined in lines 16–18 of the template. The guidance varies by level:
- B-level: Requires that “每个推算数据标注置信度” (every estimated data point must be labeled with confidence levels)
- C-level: Mandates “用第一性原理提问” (use first-principles questioning) to overcome data scarcity
These constraints are woven into subsequent sections of the skill template, ensuring the rating directly influences analytical methodology.
3. Bias Checklist Enforcement
Under the “偏见自查清单” (bias self-check list) section, the template includes a critical validation question: “我的‘确定性’感受是来自生意本质,还是来自资料数量?” [source: line 28]. This forces the analyst to distinguish between genuine business insight and illusion of knowledge created by data abundance. The report-audit tool later uses this checklist to verify that the declared rating matches the actual confidence disclosures in the final report.
4. Automated Audit Validation
The tools/report_audit.py script provides the final enforcement layer. According to lines 9–12 of the audit tool, the script:
- Extracts the “信息丰富度评级” field from the generated markdown header
- Cross-checks for the presence of required confidence disclosures appropriate to the rating
- For C-level reports, verifies that a “需要一手验证的问题清单” (needs on-the-ground verification question list) is appended [source: lines 9–10]
If any required element is missing—such as confidence labels on B-level estimates or the verification checklist for C-level companies—the audit_report() function returns a failure status and blocks publication until corrections are made.
Implementation in Code
The enforcement pipeline operates through a combination of template constraints and programmatic validation. Here is how the system processes a research report:
# Example: invoking the investment-research skill with a target ticker
from tools.report_audit import audit_report
ticker = "AAPL"
# The skill is a markdown template; the execution engine fills $ARGUMENTS
report_md = f"""\
# {ticker} 投资研究报告
信息丰富度评级: A # <-- choose A/B/C here
{open('skills/investment-research.md').read()}
"""
# Save the generated report
with open(f"{ticker}_research_report.md", "w") as f:
f.write(report_md)
# Run the audit to ensure the rating and required sections exist
audit_result = audit_report(f"{ticker}_research_report.md")
print(audit_result) # -> {"status":"pass"} or detailed failures
For C-level companies, the analyst must manually append the verification checklist as specified in the template:
## 需要一手验证的问题清单
- 是否有真实的重复购买率数据?
- 供应链关键节点的可靠性如何?
- … (other on-site checks)
Running audit_report will verify that this section appears when the rating is C, leveraging the validation logic in tools/report_audit.py.
Summary
- Workflow Integration: The rating system is embedded directly in
skills/investment-research.md(lines 13–19), making classification a mandatory first step rather than an optional metadata tag. - Behavioral Constraints: Each rating tier triggers specific methodological requirements, such as confidence labeling for B-level data and first-principles questioning for C-level analysis.
- Human Verification: The “偏见自查清单” in line 28 forces analysts to justify their certainty relative to data availability, preventing overconfidence in low-information environments.
- Automated Gates: The
tools/report_audit.pyscript (lines 9–12) programmatically validates that reports contain the correct rating headers, confidence disclosures, and C-level verification lists before publication. - Rigor Pipeline: Additional validation through
tools/financial_rigor.pyensures quantitative standards are maintained regardless of the assigned information richness tier.
Frequently Asked Questions
What distinguishes A-level from C-level information richness in the ai-berkshire framework?
A-level ratings apply to companies with abundant, high-quality public disclosures where traditional financial analysis is reliable. C-level ratings indicate data scarcity where public filings are insufficient, requiring analysts to generate “需要一手验证的问题清单” (on-ground verification questions) and apply first-principles reasoning rather than rely on historical data patterns.
How does the report_audit.py script validate rating compliance?
The script parses the markdown header to extract the “信息丰富度评级” field, then cross-references the rating against the report’s content structure. According to lines 9–10 of tools/report_audit.py, it verifies that B-level reports include confidence annotations on estimated data and that C-level reports contain the mandatory verification checklist. Missing elements trigger an audit failure.
Can a researcher bypass the A/B/C rating system?
No. The template in skills/investment-research.md explicitly requires the rating declaration at line 33 (“将信息丰富度评级结果写入报告开头”), and the automated audit_report() function will reject any markdown file lacking this header or the associated confidence disclosures appropriate to the declared level.
What role does financial_rigor.py play in the rating enforcement?
While tools/financial_rigor.py does not assign ratings, it provides the mandatory data-validation commands that execute after the rating is established. This ensures that quantitative analysis meets minimum standards regardless of whether the target is A-level (data-rich) or C-level (data-constrained), preventing quality degradation when information is scarce.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →