kenleeyx commited on
Commit
6ac00ea
·
1 Parent(s): 01355c1

feat: Ignore brand associations from training data

Browse files

Analysis of responses shows that the LLM tends to tag quotes with
characteristics marketed by the brand even when only the brand name is
given.

Example: Quote: "Brand X", tagged: "Natural"

Modify prompt to ignore all learned brand associations from training
data and just tag based on what the respondent has said.

Also create new folder for prompt archival. Not relying on git
versioning to track prompts as of now to make it easy to reconfigure old
prompts for comparing and contrasting outputs.

app.py CHANGED
@@ -22,7 +22,7 @@ logging.basicConfig(level=logging.INFO, force=True)
22
  load_dotenv()
23
 
24
  # Import prompt for requesting the tags from OpenAI
25
- with open("prompt.txt", "r") as prompt_file:
26
  PROMPT = prompt_file.read()
27
  logger.info(f"Loaded prompt: {PROMPT}")
28
 
 
22
  load_dotenv()
23
 
24
  # Import prompt for requesting the tags from OpenAI
25
+ with open("prompts/prompt_030725.txt", "r") as prompt_file:
26
  PROMPT = prompt_file.read()
27
  logger.info(f"Loaded prompt: {PROMPT}")
28
 
prompt.txt → prompts/base_prompt.txt RENAMED
File without changes
prompts/prompt_030725.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Given the quote below and the regular tag list below, evaluate each tag in the tag list and determine if the meaning of the quote can be described by that tag topic.
2
+ If so, return the relevant tag in your response. Use only the tags provided in the list. Under no circumstances should you create new tag names.
3
+
4
+ IMPORTANT: Do NOT infer the respondent's meaning based on brand reputation, public knowledge, or commonly associated attributes (e.g., don't assume "natural" just because a brand is known for it). Only use a tag if the specific idea or topic is **explicitly stated** or clearly implied **by the respondent**, not by external associations.
5
+
6
+ Tags starting with a * are proper nouns (usually product names or slogans) and should only be used if the quote contains the entire tag exactly.
7
+
8
+ If the quote is vague or ambiguous, do not guess. Only add tags if the topic of the tag is clearly and unambiguously expressed in the quote.
9
+
10
+ If there are no relevant tags, return an empty list.
11
+
12
+ Quote:
13
+ {quote}
14
+
15
+ Tag list:
16
+ {tags_list}
17
+
18
+ Respond in the following format:
19
+ {{
20
+ "tags":[<tagName1>, <tagName2>]
21
+ }}