fabricatio 0.2.6.dev1__cp312-cp312-win_amd64.whl → 0.2.7__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fabricatio/__init__.py +7 -24
- fabricatio/_rust.cp312-win_amd64.pyd +0 -0
- fabricatio/_rust.pyi +22 -0
- fabricatio/actions/article.py +168 -19
- fabricatio/actions/article_rag.py +35 -0
- fabricatio/actions/output.py +21 -6
- fabricatio/actions/rag.py +51 -3
- fabricatio/capabilities/correct.py +55 -11
- fabricatio/capabilities/rag.py +67 -16
- fabricatio/capabilities/rating.py +15 -6
- fabricatio/capabilities/review.py +7 -4
- fabricatio/capabilities/task.py +5 -5
- fabricatio/config.py +29 -21
- fabricatio/decorators.py +32 -0
- fabricatio/models/action.py +117 -43
- fabricatio/models/extra/article_base.py +378 -0
- fabricatio/models/extra/article_essence.py +226 -0
- fabricatio/models/extra/article_main.py +196 -0
- fabricatio/models/extra/article_outline.py +32 -0
- fabricatio/models/extra/article_proposal.py +35 -0
- fabricatio/models/generic.py +164 -14
- fabricatio/models/kwargs_types.py +51 -10
- fabricatio/models/role.py +30 -6
- fabricatio/models/tool.py +6 -2
- fabricatio/models/usages.py +94 -47
- fabricatio/models/utils.py +29 -2
- fabricatio/parser.py +2 -0
- fabricatio/workflows/articles.py +12 -1
- fabricatio-0.2.7.data/scripts/tdown.exe +0 -0
- fabricatio-0.2.7.dist-info/METADATA +181 -0
- fabricatio-0.2.7.dist-info/RECORD +47 -0
- {fabricatio-0.2.6.dev1.dist-info → fabricatio-0.2.7.dist-info}/WHEEL +1 -1
- fabricatio/models/extra.py +0 -171
- fabricatio-0.2.6.dev1.data/scripts/tdown.exe +0 -0
- fabricatio-0.2.6.dev1.dist-info/METADATA +0 -312
- fabricatio-0.2.6.dev1.dist-info/RECORD +0 -42
- {fabricatio-0.2.6.dev1.dist-info → fabricatio-0.2.7.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,226 @@
|
|
1
|
+
"""ArticleEssence: Semantic fingerprint of academic paper for structured analysis."""
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
|
5
|
+
from fabricatio.models.generic import Display, PrepareVectorization, ProposedAble
|
6
|
+
from pydantic import BaseModel, Field
|
7
|
+
|
8
|
+
|
9
|
+
class Equation(BaseModel):
|
10
|
+
"""Mathematical formalism specification for research contributions.
|
11
|
+
|
12
|
+
Encodes equations with dual representation: semantic meaning and typeset-ready notation.
|
13
|
+
"""
|
14
|
+
|
15
|
+
description: str
|
16
|
+
"""Equation significance structured in three elements:
|
17
|
+
1. Physical/conceptual meaning of the equation.
|
18
|
+
2. Role in technical workflow (e.g., derivation, optimization, or analysis).
|
19
|
+
3. Relationship to the paper's core contribution (e.g., theoretical foundation, empirical validation).
|
20
|
+
Example: "Defines constrained search space dimensionality reduction. Used in architecture optimization phase (Section 3.2). Enables 40% parameter reduction."
|
21
|
+
"""
|
22
|
+
|
23
|
+
latex_code: str
|
24
|
+
"""LaTeX representation following academic typesetting standards:
|
25
|
+
- Must use equation environment (e.g., `equation`, `align`).
|
26
|
+
- Multiline equations must align at '=' using `&`.
|
27
|
+
- Include unit annotations where applicable.
|
28
|
+
Example: "\\begin{equation} \\mathcal{L}_{NAS} = \\alpha \\|\\theta\\|_2 + \\beta H(p) \\end{equation}"
|
29
|
+
"""
|
30
|
+
|
31
|
+
|
32
|
+
class Figure(BaseModel):
|
33
|
+
"""Visual component specification for technical communication.
|
34
|
+
|
35
|
+
Combines graphical assets with structured academic captioning.Extracted from the article provided
|
36
|
+
"""
|
37
|
+
|
38
|
+
description: str
|
39
|
+
"""Figure interpretation guide containing:
|
40
|
+
1. Key visual elements mapping (e.g., axes, legends, annotations).
|
41
|
+
2. Data representation methodology (e.g., visualization type, statistical measures).
|
42
|
+
3. Connection to research findings (e.g., supports hypothesis, demonstrates performance).
|
43
|
+
Example: "Architecture search space topology (left) vs. convergence curves (right). Demonstrates NAS efficiency gains through constrained search."
|
44
|
+
"""
|
45
|
+
|
46
|
+
figure_caption: str
|
47
|
+
"""Complete caption following Nature-style guidelines:
|
48
|
+
1. Brief overview statement (首句总结).
|
49
|
+
2. Technical detail layer (e.g., data sources, experimental conditions).
|
50
|
+
3. Result implication (e.g., key insights, implications for future work).
|
51
|
+
Example: "Figure 3: Differentiable NAS framework. (a) Search space topology with constrained dimensions. (b) Training convergence across language pairs. Dashed lines indicate baseline methods."
|
52
|
+
"""
|
53
|
+
|
54
|
+
figure_serial_number: int
|
55
|
+
"""The Image serial number extracted from the Markdown article provided, the path usually in the form of ``, in this case the serial number is `1`"""
|
56
|
+
|
57
|
+
|
58
|
+
class Algorithm(BaseModel):
|
59
|
+
"""Algorithm specification for research contributions."""
|
60
|
+
|
61
|
+
title: str
|
62
|
+
"""Algorithm title with technical focus descriptor (e.g., 'Gradient Descent Optimization').
|
63
|
+
|
64
|
+
Tip: Do not attempt to translate the original element titles when generating JSON.
|
65
|
+
"""
|
66
|
+
|
67
|
+
description: str
|
68
|
+
"""Algorithm description with technical focus descriptor:
|
69
|
+
- Includes input/output specifications.
|
70
|
+
- Describes key steps and their purpose.
|
71
|
+
- Explains its role in the research workflow.
|
72
|
+
Example: "Proposed algorithm for neural architecture search. Inputs include search space constraints and training data. Outputs optimized architecture."
|
73
|
+
"""
|
74
|
+
|
75
|
+
|
76
|
+
class Table(BaseModel):
|
77
|
+
"""Table specification for research contributions."""
|
78
|
+
|
79
|
+
title: str
|
80
|
+
"""Table title with technical focus descriptor (e.g., 'Comparison of Model Performance Metrics').
|
81
|
+
|
82
|
+
Tip: Do not attempt to translate the original element titles when generating JSON.
|
83
|
+
"""
|
84
|
+
|
85
|
+
description: str
|
86
|
+
"""Table description with technical focus descriptor:
|
87
|
+
- Includes data source and structure.
|
88
|
+
- Explains key columns/rows and their significance.
|
89
|
+
- Connects to research findings or hypotheses.
|
90
|
+
Example: "Performance metrics for different architectures. Columns represent accuracy, F1-score, and inference time. Highlights efficiency gains of proposed method."
|
91
|
+
"""
|
92
|
+
|
93
|
+
|
94
|
+
class Highlightings(BaseModel):
|
95
|
+
"""Technical showcase aggregator for research artifacts.
|
96
|
+
|
97
|
+
Curates core scientific components with machine-parseable annotations.
|
98
|
+
"""
|
99
|
+
|
100
|
+
highlighted_equations: List[Equation]
|
101
|
+
"""3-5 pivotal equations representing theoretical contributions:
|
102
|
+
- Each equation must be wrapped in $$ for display math.
|
103
|
+
- Contain at least one novel operator/symbol.
|
104
|
+
- Be referenced in Methods/Results sections.
|
105
|
+
Example: Equation describing proposed loss function.
|
106
|
+
"""
|
107
|
+
|
108
|
+
highlighted_algorithms: List[Algorithm]
|
109
|
+
"""1-2 key algorithms demonstrating methodological contributions:
|
110
|
+
- Include pseudocode or step-by-step descriptions.
|
111
|
+
- Highlight innovation in computational approach.
|
112
|
+
Example: Algorithm for constrained search space exploration.
|
113
|
+
|
114
|
+
Tip: Do not attempt to translate the original element titles when generating JSON.
|
115
|
+
"""
|
116
|
+
|
117
|
+
highlighted_figures: List[Figure]
|
118
|
+
"""4-6 key figures demonstrating:
|
119
|
+
1. Framework overview (1 required).
|
120
|
+
2. Quantitative results (2-3 required).
|
121
|
+
3. Ablation studies (1 optional).
|
122
|
+
Each must appear in Results/Discussion chapters.
|
123
|
+
Example: Figure showing architecture topology and convergence curves.
|
124
|
+
"""
|
125
|
+
|
126
|
+
highlighted_tables: List[Table]
|
127
|
+
"""2-3 key tables summarizing:
|
128
|
+
- Comparative analysis of methods.
|
129
|
+
- Empirical results supporting claims.
|
130
|
+
Example: Table comparing model performance across datasets.
|
131
|
+
|
132
|
+
Tip: Do not attempt to translate the original element titles when generating JSON.
|
133
|
+
"""
|
134
|
+
|
135
|
+
|
136
|
+
class ArticleEssence(ProposedAble, Display, PrepareVectorization):
|
137
|
+
"""Semantic fingerprint of academic paper for structured analysis.
|
138
|
+
|
139
|
+
Encodes research artifacts with dual human-machine interpretability.
|
140
|
+
"""
|
141
|
+
|
142
|
+
title: str = Field(...)
|
143
|
+
"""Exact title of the original article without any modification.
|
144
|
+
Must be preserved precisely from the source material without:
|
145
|
+
- Translation
|
146
|
+
- Paraphrasing
|
147
|
+
- Adding/removing words
|
148
|
+
- Altering style or formatting
|
149
|
+
"""
|
150
|
+
|
151
|
+
authors: List[str]
|
152
|
+
"""Original author names exactly as they appear in the source document. No translation or paraphrasing.
|
153
|
+
Extract complete list without any modifications or formatting changes."""
|
154
|
+
|
155
|
+
keywords: List[str]
|
156
|
+
"""Original keywords exactly as they appear in the source document. No translation or paraphrasing.
|
157
|
+
Extract the complete set without modifying format or terminology."""
|
158
|
+
|
159
|
+
publication_year: int
|
160
|
+
"""Publication timestamp in ISO 8601 (YYYY format)."""
|
161
|
+
|
162
|
+
highlightings: Highlightings
|
163
|
+
"""Technical highlight reel containing:
|
164
|
+
- Core equations (Theory)
|
165
|
+
- Key algorithms (Implementation)
|
166
|
+
- Critical figures (Results)
|
167
|
+
- Benchmark tables (Evaluation)"""
|
168
|
+
|
169
|
+
domain: List[str]
|
170
|
+
"""Domain tags for research focus."""
|
171
|
+
|
172
|
+
abstract: str = Field(...)
|
173
|
+
"""Three-paragraph structured abstract:
|
174
|
+
Paragraph 1: Problem & Motivation (2-3 sentences)
|
175
|
+
Paragraph 2: Methodology & Innovations (3-4 sentences)
|
176
|
+
Paragraph 3: Results & Impact (2-3 sentences)
|
177
|
+
Total length: 150-250 words"""
|
178
|
+
|
179
|
+
core_contributions: List[str]
|
180
|
+
"""3-5 technical contributions using CRediT taxonomy verbs.
|
181
|
+
Each item starts with action verb.
|
182
|
+
Example:
|
183
|
+
- 'Developed constrained NAS framework'
|
184
|
+
- 'Established cross-lingual transfer metrics'"""
|
185
|
+
|
186
|
+
technical_novelty: List[str]
|
187
|
+
"""Patent-style claims with technical specificity.
|
188
|
+
Format: 'A [system/method] comprising [novel components]...'
|
189
|
+
Example:
|
190
|
+
'A neural architecture search system comprising:
|
191
|
+
a differentiable constrained search space;
|
192
|
+
multi-lingual transferability predictors...'"""
|
193
|
+
|
194
|
+
research_problems: List[str]
|
195
|
+
"""Problem statements as how/why questions.
|
196
|
+
Example:
|
197
|
+
- 'How to reduce NAS computational overhead while maintaining search diversity?'
|
198
|
+
- 'Why do existing architectures fail in low-resource cross-lingual transfer?'"""
|
199
|
+
|
200
|
+
limitations: List[str]
|
201
|
+
"""Technical limitations analysis containing:
|
202
|
+
1. Constraint source (data/method/theory)
|
203
|
+
2. Impact quantification
|
204
|
+
3. Mitigation pathway
|
205
|
+
Example:
|
206
|
+
'Methodology constraint: Single-objective optimization (affects 5% edge cases),
|
207
|
+
mitigated through future multi-task extension'"""
|
208
|
+
|
209
|
+
future_work: List[str]
|
210
|
+
"""Research roadmap items with 3 horizons:
|
211
|
+
1. Immediate extensions (1 year)
|
212
|
+
2. Mid-term directions (2-3 years)
|
213
|
+
3. Long-term vision (5+ years)
|
214
|
+
Example:
|
215
|
+
'Short-term: Adapt framework for vision transformers (ongoing with CVPR submission)'"""
|
216
|
+
|
217
|
+
impact_analysis: List[str]
|
218
|
+
"""Bibliometric impact projections:
|
219
|
+
- Expected citation counts (next 3 years)
|
220
|
+
- Target application domains
|
221
|
+
- Standard adoption potential
|
222
|
+
Example:
|
223
|
+
'Predicted 150+ citations via integration into MMEngine (Alibaba OpenMMLab)'"""
|
224
|
+
|
225
|
+
def _prepare_vectorization_inner(self) -> str:
|
226
|
+
return self.model_dump_json()
|
@@ -0,0 +1,196 @@
|
|
1
|
+
"""ArticleBase and ArticleSubsection classes for managing hierarchical document components."""
|
2
|
+
|
3
|
+
from itertools import chain
|
4
|
+
from typing import Generator, List, Self, Tuple, override
|
5
|
+
|
6
|
+
from fabricatio.journal import logger
|
7
|
+
from fabricatio.models.extra.article_base import (
|
8
|
+
ArticleBase,
|
9
|
+
ArticleOutlineBase,
|
10
|
+
ChapterBase,
|
11
|
+
SectionBase,
|
12
|
+
SubSectionBase,
|
13
|
+
)
|
14
|
+
from fabricatio.models.extra.article_outline import (
|
15
|
+
ArticleOutline,
|
16
|
+
)
|
17
|
+
from fabricatio.models.generic import CensoredAble, Display, PersistentAble, WithRef
|
18
|
+
from fabricatio.models.utils import ok
|
19
|
+
|
20
|
+
|
21
|
+
class Paragraph(CensoredAble):
|
22
|
+
"""Structured academic paragraph blueprint for controlled content generation."""
|
23
|
+
|
24
|
+
description: str
|
25
|
+
"""Functional summary of the paragraph's role in document structure."""
|
26
|
+
|
27
|
+
writing_aim: List[str]
|
28
|
+
"""Specific communicative objectives for this paragraph's content."""
|
29
|
+
|
30
|
+
content: str
|
31
|
+
"""The actual content of the paragraph, represented as a string."""
|
32
|
+
|
33
|
+
|
34
|
+
class ArticleSubsection(SubSectionBase):
|
35
|
+
"""Atomic argumentative unit with technical specificity."""
|
36
|
+
|
37
|
+
paragraphs: List[Paragraph]
|
38
|
+
"""List of Paragraph objects containing the content of the subsection."""
|
39
|
+
|
40
|
+
def update_from_inner(self, other: Self) -> Self:
|
41
|
+
"""Updates the current instance with the attributes of another instance."""
|
42
|
+
logger.debug(f"Updating SubSection {self.title}")
|
43
|
+
super().update_from_inner(other)
|
44
|
+
self.paragraphs.clear()
|
45
|
+
self.paragraphs.extend(other.paragraphs)
|
46
|
+
return self
|
47
|
+
|
48
|
+
def to_typst_code(self) -> str:
|
49
|
+
"""Converts the component into a Typst code snippet for rendering.
|
50
|
+
|
51
|
+
Returns:
|
52
|
+
str: Typst code snippet for rendering.
|
53
|
+
"""
|
54
|
+
return f"=== {self.title}\n" + "\n\n".join(p.content for p in self.paragraphs)
|
55
|
+
|
56
|
+
|
57
|
+
class ArticleSection(SectionBase[ArticleSubsection]):
|
58
|
+
"""Atomic argumentative unit with high-level specificity."""
|
59
|
+
|
60
|
+
|
61
|
+
class ArticleChapter(ChapterBase[ArticleSection]):
|
62
|
+
"""Thematic progression implementing research function."""
|
63
|
+
|
64
|
+
|
65
|
+
class Article(
|
66
|
+
Display,
|
67
|
+
CensoredAble,
|
68
|
+
WithRef[ArticleOutline],
|
69
|
+
PersistentAble,
|
70
|
+
ArticleBase[ArticleChapter],
|
71
|
+
):
|
72
|
+
"""Represents a complete academic paper specification, incorporating validation constraints.
|
73
|
+
|
74
|
+
This class integrates display, censorship processing, article structure referencing, and persistence capabilities,
|
75
|
+
aiming to provide a comprehensive model for academic papers.
|
76
|
+
"""
|
77
|
+
|
78
|
+
@override
|
79
|
+
def iter_subsections(self) -> Generator[Tuple[ArticleChapter, ArticleSection, ArticleSubsection], None, None]:
|
80
|
+
return super().iter_subsections()
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_outline(cls, outline: ArticleOutline) -> "Article":
|
84
|
+
"""Generates an article from the given outline.
|
85
|
+
|
86
|
+
Args:
|
87
|
+
outline (ArticleOutline): The outline to generate the article from.
|
88
|
+
|
89
|
+
Returns:
|
90
|
+
Article: The generated article.
|
91
|
+
"""
|
92
|
+
# Set the title from the outline
|
93
|
+
article = Article(**outline.model_dump(exclude={"chapters"}), chapters=[])
|
94
|
+
|
95
|
+
for chapter in outline.chapters:
|
96
|
+
# Create a new chapter
|
97
|
+
article_chapter = ArticleChapter(
|
98
|
+
sections=[],
|
99
|
+
**chapter.model_dump(exclude={"sections"}),
|
100
|
+
)
|
101
|
+
for section in chapter.sections:
|
102
|
+
# Create a new section
|
103
|
+
article_section = ArticleSection(
|
104
|
+
subsections=[],
|
105
|
+
**section.model_dump(exclude={"subsections"}),
|
106
|
+
)
|
107
|
+
for subsection in section.subsections:
|
108
|
+
# Create a new subsection
|
109
|
+
article_subsection = ArticleSubsection(
|
110
|
+
paragraphs=[],
|
111
|
+
**subsection.model_dump(),
|
112
|
+
)
|
113
|
+
article_section.subsections.append(article_subsection)
|
114
|
+
article_chapter.sections.append(article_section)
|
115
|
+
article.chapters.append(article_chapter)
|
116
|
+
return article
|
117
|
+
|
118
|
+
def gather_dependencies(self, article: ArticleOutlineBase) -> List[ArticleOutlineBase]:
|
119
|
+
"""Gathers dependencies for all sections and subsections in the article.
|
120
|
+
|
121
|
+
This method should be called after the article is fully constructed.
|
122
|
+
"""
|
123
|
+
depends = [ok(a.deref(self)) for a in article.depend_on]
|
124
|
+
|
125
|
+
supports = []
|
126
|
+
for a in self.iter_dfs_rev():
|
127
|
+
if article in {ok(b.deref(self)) for b in a.support_to}:
|
128
|
+
supports.append(a)
|
129
|
+
|
130
|
+
return list(set(depends + supports))
|
131
|
+
|
132
|
+
def gather_dependencies_recursive(self, article: ArticleOutlineBase) -> List[ArticleOutlineBase]:
|
133
|
+
"""Gathers all dependencies recursively for the given article.
|
134
|
+
|
135
|
+
Args:
|
136
|
+
article (ArticleOutlineBase): The article to gather dependencies for.
|
137
|
+
|
138
|
+
Returns:
|
139
|
+
List[ArticleBase]: A list of all dependencies for the given article.
|
140
|
+
"""
|
141
|
+
q = self.gather_dependencies(article)
|
142
|
+
|
143
|
+
deps = []
|
144
|
+
while q:
|
145
|
+
a = q.pop()
|
146
|
+
deps.extend(self.gather_dependencies(a))
|
147
|
+
|
148
|
+
deps = list(
|
149
|
+
chain(
|
150
|
+
filter(lambda x: isinstance(x, ArticleChapter), deps),
|
151
|
+
filter(lambda x: isinstance(x, ArticleSection), deps),
|
152
|
+
filter(lambda x: isinstance(x, ArticleSubsection), deps),
|
153
|
+
)
|
154
|
+
)
|
155
|
+
|
156
|
+
# Initialize result containers
|
157
|
+
formatted_code = ""
|
158
|
+
processed_components = []
|
159
|
+
|
160
|
+
# Process all dependencies
|
161
|
+
while deps:
|
162
|
+
component = deps.pop()
|
163
|
+
# Skip duplicates
|
164
|
+
if (component_code := component.to_typst_code()) in formatted_code:
|
165
|
+
continue
|
166
|
+
|
167
|
+
# Add this component
|
168
|
+
formatted_code += component_code
|
169
|
+
processed_components.append(component)
|
170
|
+
|
171
|
+
return processed_components
|
172
|
+
|
173
|
+
def iter_dfs_with_deps(
|
174
|
+
self, chapter: bool = True, section: bool = True, subsection: bool = True
|
175
|
+
) -> Generator[Tuple[ArticleOutlineBase, List[ArticleOutlineBase]], None, None]:
|
176
|
+
"""Iterates through the article in a depth-first manner, yielding each component and its dependencies.
|
177
|
+
|
178
|
+
Args:
|
179
|
+
chapter (bool, optional): Whether to include chapter components. Defaults to True.
|
180
|
+
section (bool, optional): Whether to include section components. Defaults to True.
|
181
|
+
subsection (bool, optional): Whether to include subsection components. Defaults to True.
|
182
|
+
|
183
|
+
Yields:
|
184
|
+
Tuple[ArticleBase, List[ArticleBase]]: Each component and its dependencies.
|
185
|
+
"""
|
186
|
+
if all((not chapter, not section, not subsection)):
|
187
|
+
raise ValueError("At least one of chapter, section, or subsection must be True.")
|
188
|
+
|
189
|
+
for component in self.iter_dfs_rev():
|
190
|
+
if not chapter and isinstance(component, ArticleChapter):
|
191
|
+
continue
|
192
|
+
if not section and isinstance(component, ArticleSection):
|
193
|
+
continue
|
194
|
+
if not subsection and isinstance(component, ArticleSubsection):
|
195
|
+
continue
|
196
|
+
yield component, (self.gather_dependencies_recursive(component))
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"""A module containing the ArticleOutline class, which represents the outline of an academic paper."""
|
2
|
+
|
3
|
+
from fabricatio.models.extra.article_base import (
|
4
|
+
ArticleBase,
|
5
|
+
ChapterBase,
|
6
|
+
SectionBase,
|
7
|
+
SubSectionBase,
|
8
|
+
)
|
9
|
+
from fabricatio.models.extra.article_proposal import ArticleProposal
|
10
|
+
from fabricatio.models.generic import CensoredAble, Display, PersistentAble, WithRef
|
11
|
+
|
12
|
+
|
13
|
+
class ArticleSubsectionOutline(SubSectionBase):
|
14
|
+
"""Atomic research component specification for academic paper generation."""
|
15
|
+
|
16
|
+
|
17
|
+
class ArticleSectionOutline(SectionBase[ArticleSubsectionOutline]):
|
18
|
+
"""A slightly more detailed research component specification for academic paper generation, Must contain subsections."""
|
19
|
+
|
20
|
+
|
21
|
+
class ArticleChapterOutline(ChapterBase[ArticleSectionOutline]):
|
22
|
+
"""Macro-structural unit implementing standard academic paper organization. Must contain sections."""
|
23
|
+
|
24
|
+
|
25
|
+
class ArticleOutline(
|
26
|
+
Display,
|
27
|
+
CensoredAble,
|
28
|
+
WithRef[ArticleProposal],
|
29
|
+
PersistentAble,
|
30
|
+
ArticleBase[ArticleChapterOutline],
|
31
|
+
):
|
32
|
+
"""Outline of an academic paper, containing chapters, sections, subsections."""
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"""A structured proposal for academic paper development with core research elements."""
|
2
|
+
|
3
|
+
from typing import Dict, List
|
4
|
+
|
5
|
+
from fabricatio.models.generic import AsPrompt, CensoredAble, Display, PersistentAble, WithRef
|
6
|
+
|
7
|
+
|
8
|
+
class ArticleProposal(CensoredAble, Display, WithRef[str], AsPrompt, PersistentAble):
|
9
|
+
"""Structured proposal for academic paper development with core research elements.
|
10
|
+
|
11
|
+
Guides LLM in generating comprehensive research proposals with clearly defined components.
|
12
|
+
"""
|
13
|
+
|
14
|
+
technical_approaches: List[str]
|
15
|
+
"""Technical approaches"""
|
16
|
+
|
17
|
+
research_methods: List[str]
|
18
|
+
"""Methodological components (list of techniques/tools).
|
19
|
+
Example: ['Differentiable architecture search', 'Transformer-based search space', 'Multi-lingual perplexity evaluation']"""
|
20
|
+
|
21
|
+
research_aim: List[str]
|
22
|
+
"""Primary research objectives (list of 2-4 measurable goals).
|
23
|
+
Example: ['Develop parameter-efficient NAS framework', 'Establish cross-lingual architecture transfer metrics']"""
|
24
|
+
|
25
|
+
focused_problem: List[str]
|
26
|
+
"""Specific research problem(s) or question(s) addressed (list of 1-3 concise statements).
|
27
|
+
Example: ['NAS computational overhead in low-resource settings', 'Architecture transferability across language pairs']"""
|
28
|
+
|
29
|
+
title: str
|
30
|
+
"""Paper title in academic style (Title Case, 8-15 words). Example: 'Exploring Neural Architecture Search for Low-Resource Machine Translation'"""
|
31
|
+
language: str
|
32
|
+
"""Written language of the article. SHALL be aligned to the language of the article briefing provided."""
|
33
|
+
|
34
|
+
def _as_prompt_inner(self) -> Dict[str, str]:
|
35
|
+
return {"ArticleBriefing": self.referenced, "ArticleProposal": self.display()}
|