[backend]構成・内容の評価プロンプトとAPI仕様書の例からフィラートークンを外す

Open Beginner friendly
#219 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Read backend/app/services/llm.py and locate evaluate_interview()'s system prompt, then inspect the relevant turns[].content example in documents/backend/API仕様.md. Remove the obsolete filler-token wording and update the example without filler tokens. Run the provided docker compose unittest discovery command; done means the prompt and API documentation match the filler-free input behavior and existing tests pass.

Written by the indexing model from the issue text.

Description

種別: 実装 — コードを書き、検証してから PR を出す。

目的

評価APIの turns[].content がフィラー除去済みテキストになる仕様変更(#218)に合わせ、構成・内容を評価するLLMへのプロンプトと、正本であるAPI仕様書の記載を実態に合わせる。

現行の backend/app/services/llm.pyevaluate_interview() は、システムプロンプトで「%で囲まれた語(例: %えー%)は文字起こしが検出したフィラー(言い淀み)です」とLLMに明示し、フィラートークンを言い淀みとして解釈させた上で構成・内容のコメント・アドバイスを生成させている。documents/backend/API仕様.mdturns[].content 例もフィラートークン付きの文字列になっている。#218 でフロントエンドが常にフィラー除去済みテキストを送るようになると、このプロンプトの一文とAPI仕様書の例は実態と食い違う。

完了条件

  • backend/app/services/llm.pyevaluate_interview() システムプロンプトから「%で囲まれた語(例: %えー%)は文字起こしが検出したフィラー(言い淀み)です。」の一文を削除する
  • documents/backend/API仕様.mdturns[].content 例(該当箇所)をフィラートークンを含まないテキストに更新する
  • 既存のバックエンドのテストが変更後も成功する

やらないこと

  • フィラー数・話速の算出ロジック(filler_count 等)の変更
  • フロントエンドの変更(#218 で対応)
  • /interviews/chat 側のプロンプト・仕様変更

触る範囲

  • backend/app/services/llm.py
  • documents/backend/API仕様.md
  • 関連テスト

検証方法

docker compose build api
docker compose run --rm --no-deps -e SEED_DEV_USER=false -e JWT_SECRET_KEY=test-secret api uv run --frozen python -m unittest discover -s tests

前提・依存

  • 関連Issue: #218 — 評価APIへ送るcontentを常にフィラー除去済みにする。着手順序はどちらが先でも支障ないが、対で完了させることが望ましい

未決事項

なし。

参考

Dominant language
HTML
Stars
1
Forks
0
Avg merge
1h 19m
Merged PRs (30d)
76

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from study-basic-hackathon/hanasu

All issues in study-basic-hackathon/hanasu

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.