-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] Gpt prompt tuning #13
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
Conversation
β¦-Guard/BlockGuard-AI into feat/#10/gpt-prompt-tuning
β¦-Guard/BlockGuard-AI into feat/#10/gpt-prompt-tuning
β¦-Guard/BlockGuard-AI into feat/#10/gpt-prompt-tuning
β¦-Guard/BlockGuard-AI into feat/#10/gpt-prompt-tuning
WalkthroughFraudResponse.score μνμ 70β80μΌλ‘ νμ₯νκ³ , FRAUD_EXAMPLES λ° score_rulesμ ν€μλΒ·κ°μ€μΉκ° κ΄λ²μνκ² κ°±μ λμμΌλ©°, μ€μ½μ΄λ§ λμκ³Ό λ§€μΉ κ·μΉμ΄ messageContent/keywords/additionalDescription λ° μ μ¬μ΄ μν λ§€μΉμΌλ‘ νμ₯λμμ΅λλ€. (50λ¨μ΄ μ΄λ΄) Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant FraudScorer as fraud_prompts.py
participant RuleLoader as score_rules.txt
participant Examples as fraud_examples.py
User->>FraudScorer: messageContent, keywords, additionalDescription, imageContent
FraudScorer->>RuleLoader: κ·μΉ λΆλ¬μ€κΈ°(μΉ΄ν
κ³ λ¦¬/κ°μ€μΉ/ν ν°)
RuleLoader-->>FraudScorer: κ·μΉ λ°μ΄ν°
FraudScorer->>FraudScorer: ν
μ€νΈΒ·ν€μλΒ·μΆκ°μ€λͺ
μμ μν λ§€μΉ μν
FraudScorer->>FraudScorer: κ·μΉλ³ μ μ ν©μ°(μΉ΄ν
κ³ λ¦¬ μΊ‘ μ μ©, μ΅μ’
μν 80)
FraudScorer->>Examples: μμ ννΈ μ‘°ν(μ νμ )
Examples-->>FraudScorer: μμ κΈ°λ° λ³΄μ‘°μ 보
FraudScorer-->>User: FraudResponse(score 0~80, category, matches, explanation)
Estimated code review effortπ― 3 (Moderate) | β±οΈ ~20 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (1)
π§ Files skipped from review as they are similar to previous changes (1)
β¨ Finishing Touches
π§ͺ Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
π Outside diff range comments (2)
app/prompts/fraud_prompts.py (2)
34-34: μ μ λ²μ λΆμΌμΉ λ¬Έμ Line 34μμ μ μ λ²μκ° μ¬μ ν "0~70"μΌλ‘ λμ΄ μμΌλ,
FraudResponseλͺ¨λΈμμλ μνμ΄ 80μΌλ‘ λ³κ²½λμμ΅λλ€.- "score": <0~70μ μ€μκ°> + "score": <0~80μ μ€μκ°>
11-11: μμ€ν ν둬ννΈμ μ μ λ²μ μ λ°μ΄νΈ νμLine 11μμλ μ μ λ²μκ° "μ΅λ 70μ "μΌλ‘ λμ΄ μμ΄ μ λ°μ΄νΈκ° νμν©λλ€.
-3) μ μλ μ΅μ 0μ μμ μ΅λ 70μ +3) μ μλ μ΅μ 0μ μμ μ΅λ 80μ
β»οΈ Duplicate comments (1)
app/prompts/data/fraud_examples.py (1)
65-65: Line 65μ ν€μλ νμ λΆμΌμΉ λ°κ²¬Line 23κ³Ό λμΌνκ² "μ‘κΈ/νκΈμΈμΆ" ν€μλμ λΆνμν κ³΅λ°±μ΄ μμ΅λλ€.
π§Ή Nitpick comments (2)
app/prompts/fraud_prompts.py (2)
16-19: μ μ κ³μ° λ‘μ§μ΄ λͺ ννκ² νμ₯λμμ΅λλ€.
messageContent,keywords,additionalDescriptionνλλ₯Ό λͺ¨λ κ³ λ €νλλ‘ μ μ κ³μ° λ‘μ§μ΄ νμ₯λμμ΅λλ€. νΉν Line 17μ "μλ―Έ/ννμ ν΄λΉ λ£°μ ν΄λΉλλ€λ©΄ νλ¨νλ©΄"μ΄λΌλ ννμ λ€μ μ΄μνλ μμ μ μ μν©λλ€.-- 'messageContent', 'keywords', 'additionalDescription'μ ν΄λΉ λ£°μ ν€μλ μ€ 1κ°λΌλ μλ―Έ/ννμ ν΄λΉ λ£°μ ν΄λΉλλ€λ©΄ νλ¨νλ©΄ κ·Έ λ£°μ λ°°μ μ κ°μ°(λ£°λ³ μ΅λ 1ν). +- 'messageContent', 'keywords', 'additionalDescription'μ ν΄λΉ λ£°μ ν€μλ μ€ 1κ°λΌλ μλ―Έ/ννμ λ§€μΉλλ©΄ κ·Έ λ£°μ λ°°μ μ κ°μ°(λ£°λ³ μ΅λ 1ν).
19-20: μ μ¬ ν€μλ λ§€μΉ λ‘μ§ μΆκ°κ° ν¨κ³Όμ μ λλ€.Line 19μ "κ·μΉνμ κ°μ λ£°λ€μ ν€μλλ€μ μ μ¬μ±μ λΆμνκ³ "λ λ¬Έλ²μ μΌλ‘ κ°μ μ΄ νμν©λλ€. κ΄λν λ§€μΉμ μ¬κΈ° νμ§μ¨μ λμ΄λ λ° λμμ΄ λ κ²μ λλ€.
-- κ·μΉνμ κ°μ λ£°λ€μ ν€μλλ€μ μ μ¬μ±μ λΆμνκ³ , μ μ¬ν ν€μλλ ν΄λΉ λ£°μ λ§€μΉμ¬λΆλ₯Ό κ΄λνκ² νλ¨ν κ²μ λͺ μ¬ν΄λΌ. +- κ·μΉνμ κ° λ£°μ μλ ν€μλλ€μ μ μ¬μ±μ λΆμνκ³ , μ μ¬ν ν€μλλ ν΄λΉ λ£°μ λ§€μΉλλ κ²μΌλ‘ κ΄λνκ² νλ¨ν κ².
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (4)
app/models/fraud_response.py(1 hunks)app/prompts/data/fraud_examples.py(18 hunks)app/prompts/data/score_rules.txt(1 hunks)app/prompts/fraud_prompts.py(1 hunks)
π§° Additional context used
𧬠Code Graph Analysis (1)
app/prompts/data/fraud_examples.py (1)
app/prompts/fraud_example.py (1)
FraudExample(4-8)
π Additional comments (9)
app/models/fraud_response.py (1)
8-8: μ μ μν λ³κ²½μ΄ μ μ ν μ μ©λμμ΅λλ€.μνλ μ μ μνμ΄ 70μμ 80μΌλ‘ μ¦κ°λμκ³ , μ€λͺ λ μΌμΉνκ² μ λ°μ΄νΈλμμ΅λλ€. λ³κ²½μ΄ μ ννκ² κ΅¬νλμμ΅λλ€.
app/prompts/data/fraud_examples.py (3)
19-27: μλ‘μ΄ ν€μλ λΆλ₯ 체κ³κ° μ μ μ©λμμ΅λλ€."λ¬Έμ λ° μ ν (μ°κ³ μ¬μ©)", "κΈμ΅κΈ°κ΄", "μ‘κΈ/νκΈμΈμΆ" λ± λ©ν°μ±λ μ¬κΈ° ν¨ν΄μ ν¬μ°©νλ μλ‘μ΄ ν€μλλ€μ΄ μΆκ°λμμ΅λλ€. νΉν 볡ν©μ μΈ μ¬κΈ° μλ²μ νμ§νλ λ° ν¨κ³Όμ μΌ κ²μΌλ‘ 보μ λλ€.
87-89: μλ‘μ΄ μ¬κΈ° μ νλ³ ν€μλ ꡬμ±μ΄ μ μ ν©λλ€.λμμΉ μ΄λμ₯νμ "λ¬Έμ/λ©μ μ ", "κ°μ‘±/μΉκ΅¬/μ§μΈ", "μ± μ€μΉ(λ§ν¬ν΄λ¦)/νμΌ λ€μ΄λ‘λ" ν€μλκ° μ μ ν λ°°μΉλμ΄ ν΄λΉ μ¬κΈ° μ νμ νΉμ±μ μ λ°μνκ³ μμ΅λλ€.
216-218: ν¬μ κ΄λ ¨ μ¬κΈ° μ νμ ν€μλ νμ₯μ΄ μ²΄κ³μ μ λλ€.μλ°/λΆμ , κ°μνν, μ£Όμν¬μ, μ²μ½ 곡λͺ¨μ£Ό μ¬κΈ°νμ λν΄ "ν¬μνμ¬/κ°μννκ±°λμ", "μ£ΌμμΆμ²/리λ©λ°©/μ²μ½λΉμ²¨", "ν¬μ리λ©λ°©/κ°μννκ±°λμ" λ± μΈλΆνλ ν€μλκ° μΆκ°λμ΄ κΈμ΅ μ¬κΈ° νμ§ μ νλκ° ν₯μλ κ²μΌλ‘ μμλ©λλ€.
Also applies to: 277-281, 298-301, 319-322
app/prompts/fraud_prompts.py (1)
21-21: μΉ΄ν κ³ λ¦¬λ³ μ μ μν μ μ§μ λν νμΈ νμμΉ΄ν κ³ λ¦¬λ³ μ μ μνμ΄ μ¬μ ν 70μΌλ‘ μ μ§λκ³ μμΌλ,
FraudResponse.scoreμ μνμ 80μΌλ‘ μ¦κ°νμ΅λλ€. μ΄λ μλμ μΈ κ²μΈμ§ νμΈμ΄ νμν©λλ€.ν둬ννΈμμ μΉ΄ν κ³ λ¦¬λ³ μνμ 70μΌλ‘ μ μ§νλ©΄μ μ 체 μ μ μνμ 80μΌλ‘ μ€μ ν κ²μ΄ μλμ μΈμ§ νμΈμ΄ νμν©λλ€. λ§μ½ μλμ μ΄λΌλ©΄ μ¬λ¬ μΉ΄ν κ³ λ¦¬μ μ μλ₯Ό ν©μ°νλ λ‘μ§μ΄ μλμ§, μλλ©΄ 보λμ€ μ μκ° μΆκ°λλμ§ λͺ νν ν΄μΌ ν©λλ€.
app/prompts/data/score_rules.txt (4)
2-7: κΈ°κ΄ μ¬μΉν(CAT01) κ°μ€μΉ μ‘°μ μ΄ μ μ ν©λλ€.A κ°μ€μΉκ° 30μμ 20μΌλ‘ κ°μνκ³ , "μ λΆ/곡곡기κ΄", "λ²μ£μ°λ£¨" λ± μλ‘μ΄ ν€μλκ° μΆκ°λμ΄ νμ§ λ²μκ° νλλμμ΅λλ€.
15-15: "μλ΄ μ°κ²° μ λ" ν€μλμ μ λ΅μ λ°°μΉκ° ν¨κ³Όμ μ λλ€.μ¬λ¬ μΉ΄ν κ³ λ¦¬μ "μλ΄ μ°κ²° μ λ" ν€μλκ° μΆκ°λμ΄ νΌμ±μ ν΅μ¬ ν¨ν΄μΈ μλ΄ μ λλ₯Ό ν¨κ³Όμ μΌλ‘ νμ§ν μ μμ κ²μΌλ‘ 보μ λλ€.
Also applies to: 22-22, 30-30, 36-36, 44-44, 68-68, 81-81, 105-105, 112-112, 128-128
94-98: νλ°° μ¬κΈ°ν(CAT13) νμ₯μ΄ ν¬κ΄μ μ λλ€.νλ°°μ¬ λͺ©λ‘(CJλνν΅μ΄, νμ§νλ°°, λ‘μ νλ°°)κ³Ό λ°°μ‘ κ΄λ ¨ ν€μλ("λ°°μ‘ μ‘°ν", "λ°°μ‘μ‘°ν νμ΄μ§")κ° μΆκ°λμ΄ νλ°° μ¬μΉ μ¬κΈ°λ₯Ό λ ν¨κ³Όμ μΌλ‘ νμ§ν μ μμ κ²μ λλ€.
100-105: κ°μνν μ¬κΈ°ν(CAT14) μ¬κ΅¬μ±μ΄ 체κ³μ μ λλ€.κ°μνν κ±°λμλ₯Ό A νλͺ©μΌλ‘ μ¬λ°°μΉνκ³ κ°μ€μΉλ₯Ό μ‘°μ ν κ²μ΄ μ μ ν©λλ€. νΉν "ν΄μΈIP λ‘κ·ΈμΈ", "ν΄λ©΄κ³μ μκ°" λ± μ€μ μ¬κΈ° μλ²μ λ°μν ν€μλκ° ν¨κ³Όμ μ λλ€.
π» Related Issue
π Work Description
ππ»ββοΈ To Reviewer
μλ‘ μΆκ°λ λ¬Ένμ λνμ¬ ν€μλ μμ λ¬Ένμ μΆκ°νμμ΅λλ€. λλΆμ΄ μ μν λ‘μ§μ μμ νκ³ gpt ν둬ννΈ νλμ μλ£νμμ΅λλ€.
Summary by CodeRabbit
μλ‘μ΄ κΈ°λ₯
κ°μ μ¬ν