@graphai/prompts 0.0.1
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.
- package/README.md +28 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib/prompt.d.ts +5 -0
- package/lib/prompt.js +8 -0
- package/lib/prompts_agent.d.ts +7 -0
- package/lib/prompts_agent.js +34 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
# @graphai/prompts for GraphAI
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Install
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
yarn add @graphai/prompts
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { GraphAI } from "graphai";
|
|
17
|
+
import { promptsAgent } from "@graphai/prompts";
|
|
18
|
+
|
|
19
|
+
const agents = { promptsAgent };
|
|
20
|
+
|
|
21
|
+
const graph = new GraphAI(graph_data, agents);
|
|
22
|
+
const result = await graph.run();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.promptsAgent = void 0;
|
|
7
|
+
const prompts_agent_1 = __importDefault(require("./prompts_agent"));
|
|
8
|
+
exports.promptsAgent = prompts_agent_1.default;
|
package/lib/prompt.d.ts
ADDED
package/lib/prompt.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.data = void 0;
|
|
4
|
+
exports.data = {
|
|
5
|
+
paper1: "与えられた論文の要点をまとめ、以下の項目で日本語で出力せよ。それぞれの項目は最大でも180文字以内に要約せよ。\n\n```\n論文名:タイトルの日本語訳\nキーワード:この論文のキーワード\n課題:この論文が解決する課題\n手法:この論文が提案する手法,\n結果:提案手法によって得られた結果\n```\n",
|
|
6
|
+
paper2: "# 論文分析の基本方針\n\nあなたは研究論文の深い理解と分析を専門とする研究者として振る舞います。\n目的は、論文の本質的な価値と技術的な詳細の両方を、読み手が十分に理解できるようにすることです。\n\n# 分析の基本原則\n\n1. 詳細性:各セクションで論文の重要な詳細を漏らさず説明\n2. 具体性:定量的なデータや具体例を積極的に含める\n3. 客観性:論文中の事実に基づいた分析を行う\n4. 文脈重視:研究の背景や位置づけを明確に説明\n\n# 詳細な分析フレームワーク\n\n## 1. どんなもの?\n研究の全体像を包括的に理解できるよう説明してください:\n- 研究の主目的と背景\n- 提案手法の概要と特徴\n- 想定されるユースケースや応用領域\n- 研究の技術的新規性\n- 達成された主要な成果\n\n## 2. どうやって有効だと検証した?\n研究の実証性を詳細に説明してください:\n- 実験のセットアップと条件\n- 使用したデータセットの詳細\n- 評価指標とその選択理由\n- 比較対象とした既存手法の詳細\n- 具体的な実験結果と数値\n- 統計的な有意性や信頼性の検証方法\n- 実験の制約条件や前提条件\n\n## 3. 先行研究と比べてどうすごい?\n研究の優位性を多角的に分析してください:\n- 類似研究の歴史的な発展と文脈\n- 既存手法との具体的な技術的差異\n- 性能面での定量的な改善度\n- 計算コストや実装の複雑さの比較\n- 新しいパラダイムや視点の提供\n- 実用面での優位性\n\n## 4. 議論はある?\n研究の限界と将来性について深く考察してください:\n- 手法の理論的な制約や限界\n- 実験結果の一般化可能性\n- 未解決の技術的課題\n- 実用化に向けた障壁\n- 環境依存性や再現性の課題\n- 著者らが認識している改善点\n- 将来の研究方向性への示唆\n- 潜在的な倫理的考慮事項\n\n## 5. 技術や手法のキモはどこ?\n研究の技術的な核心を詳細に解説してください:\n- アルゴリズムやモデルの基本原理\n- 実装上の重要な工夫点\n- パラメータ設計の考え方\n- 計算効率化のための手法\n- システム構成の特徴\n- 新規性の高い技術要素\n- 他研究への応用可能性\n- 技術的なブレークスルーの詳細\n\n## 6. 次に読むべき論文は?\n研究の文脈を広く理解するための文献を紹介してください:\n- この研究の理論的基盤となった重要文献\n- 直接的な影響を与えた先行研究\n- 関連する最新の発展研究\n- 異なるアプローチによる類似研究\n- 応用分野における重要文献\n- 各文献の主要な貢献や関連性の説明\n\n# 出力形式\n\n各セクションは、段落形式で詳細に説明してください。出力例:\n\n```markdown\n1. **どんなもの?**\n[研究の背景と目的から始め、提案手法の概要、主要な成果まで、段落形式で詳細に説明]\n\n2. **どうやって有効だと検証した?**\n[実験手法、データセット、評価方法、結果について、具体的な数値を含めて詳細に説明]\n\n[以下同様に続く]\n```\n\n# 分析時の注意事項\n\n1. 説明の深さ\n- 重要な技術的詳細は省略せず説明\n- 複雑な概念は必要に応じて例を用いて解説\n- 数値データは適切な文脈とともに提示\n\n2. バランスの取れた記述\n- 研究の強みと限界を公平に扱う\n- 理論と実践の両面から評価\n- 短期的・長期的な影響を考慮\n\n3. 文脈の重視\n- 研究分野における位置づけを明確に\n- 時系列的な技術発展の中での意義\n- 産業への影響や社会的意義\n\n4. 情報の信頼性\n- 論文中の明示的な記述に基づく\n- 推測が必要な場合はその旨を明記\n- 不確実な情報は適切に注釈\n\nこの分析フレームワークに従って、論文の本質的な価値と技術的な詳細の両方を、読み手が十分に理解できるような分析を提供してください。\n",
|
|
7
|
+
test: "this is test prompt.\n",
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgentFunction, AgentFunctionInfo } from "graphai";
|
|
2
|
+
import { data } from "./prompt";
|
|
3
|
+
export declare const promptsAgent: AgentFunction<{
|
|
4
|
+
promptKey: keyof typeof data;
|
|
5
|
+
}>;
|
|
6
|
+
declare const promptsAgentInfo: AgentFunctionInfo;
|
|
7
|
+
export default promptsAgentInfo;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptsAgent = void 0;
|
|
4
|
+
const prompt_1 = require("./prompt");
|
|
5
|
+
const promptsAgent = async ({ params }) => {
|
|
6
|
+
const { promptKey } = params;
|
|
7
|
+
const prompt = prompt_1.data[promptKey];
|
|
8
|
+
return {
|
|
9
|
+
text: prompt,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.promptsAgent = promptsAgent;
|
|
13
|
+
const promptsAgentInfo = {
|
|
14
|
+
name: "promptsAgent",
|
|
15
|
+
agent: exports.promptsAgent,
|
|
16
|
+
mock: exports.promptsAgent,
|
|
17
|
+
samples: [
|
|
18
|
+
{
|
|
19
|
+
inputs: {},
|
|
20
|
+
params: {
|
|
21
|
+
promptKey: "test",
|
|
22
|
+
},
|
|
23
|
+
result: {
|
|
24
|
+
text: "this is test prompt.\n",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
description: "Prompts Agent",
|
|
29
|
+
category: ["prompt"],
|
|
30
|
+
author: "Receptron team",
|
|
31
|
+
repository: "https://github.com/receptron/graphai",
|
|
32
|
+
license: "MIT",
|
|
33
|
+
};
|
|
34
|
+
exports.default = promptsAgentInfo;
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@graphai/prompts",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"./lib"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"eslint": "eslint src --fix",
|
|
12
|
+
"format": "prettier --write '{src,tests}/**/*.ts'",
|
|
13
|
+
"doc": "npx agentdoc",
|
|
14
|
+
"create": "node scripts/conv.js && yarn run format",
|
|
15
|
+
"test_run": "node --test --require ts-node/register ./tests/run_*.ts",
|
|
16
|
+
"test": "node --test --require ts-node/register ./tests/test_*.ts",
|
|
17
|
+
"ci": "yarn run format && yarn run eslint && yarn run test && yarn run build"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/isamu/graphai-agents.git"
|
|
22
|
+
},
|
|
23
|
+
"author": "",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/isamu/graphai-agents/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/isamu/graphai-agents#readme",
|
|
29
|
+
"devDependencies": {},
|
|
30
|
+
"dependencies": {}
|
|
31
|
+
}
|