Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]extractionの実行結果のキャッシング #32

Open
nasuka opened this issue Dec 21, 2024 · 5 comments
Open

[FEATURE]extractionの実行結果のキャッシング #32

nasuka opened this issue Dec 21, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@nasuka
Copy link
Collaborator

nasuka commented Dec 21, 2024

背景

  • 同一のプロンプトで、同一の入力データ(comment)に対して何度もextractionを実行するケースがある
    • e.g.
      • 回線不調などの理由でextractionが途中で失敗したため再実行するケース
      • 入力データを追加して再度レポート出力を実行するケース
  • このようなケースでは、出力は同一になるためLLMを再実行するのがコスト・時間的に無駄となる

提案内容

  • プロンプト単位で入力データごとに実行結果を保存しておき、extraction実行時にプロンプト・commentが同一の実行結果があればそちらを出力として利用する

その他

@nasuka nasuka added the enhancement New feature or request label Dec 21, 2024
@nishio
Copy link
Collaborator

nishio commented Dec 23, 2024

args.csvにprompt_hashカラムを足すという案

@nishio
Copy link
Collaborator

nishio commented Dec 23, 2024

いや、cache//args.csv の方が自然か??

@nishio
Copy link
Collaborator

nishio commented Dec 23, 2024

これ今自分が必要な半分まで一旦作っちゃいますね

@nasuka
Copy link
Collaborator Author

nasuka commented Dec 24, 2024

@nishio
ありがとうございます、お願いします!

@nishio
Copy link
Collaborator

nishio commented Dec 24, 2024

fe7b6eb
既存のファイルを再利用するところまで作ったがテストはできてない
この後、どこかに前回のpromptのhashを保存しておいて「一致しているなら再利用、してないなら新規」として、
ついでに「一致してなくても再利用させるコマンドラインオプション」を追加しようかなというところ。
一旦別のことを優先するので現状のメモ。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants