summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-08-09 07:52:24 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-08-09 08:36:25 +0800
commit22847f1b0aa680303e954c2a0cb61fbd58ff92d3 (patch)
tree4eeb7645c9da7e10eab342f25e8e5e3e0b24c86b /main.c
parent82ecac4a60136ec3289d3a404c99fa4829fce298 (diff)
downloadlex-22847f1b0aa680303e954c2a0cb61fbd58ff92d3.tar.gz
Improve prompt, move results to bench.
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/main.c b/main.c
index 4294b8e..9d05e53 100644
--- a/main.c
+++ b/main.c
@@ -10,28 +10,19 @@
#define MODEL_PATH "qwen2.5-3b-instruct-q4_k_m.gguf"
#define SYSTEM_PROMPT \
- "You are a lexicographer. Define the target word in the context provided.\n\n" \
- "Output format strictly as follows:\n" \
+ "You are a dictionary assistant. Define the target word in the context provided.\n" \
+ "DO NOT repeat target word in definition. Choose one or two of Formality levels.\n\n" \
+ "Output format:\n" \
"<WORD> (<part of speech>) — <Formality: Conversational|Formal|Literary|Figurative|Archaic>\n\n" \
"DEFINITION:\n" \
"<terse, highly accurate definition in context>\n\n" \
"GENERAL TONE:\n" \
- "<1 terse note on emotional/attitudinal charge/register if relevant. Include standard conversational alternative where applicable.>\n\n" \
+ "<One terse sentence of describing general tone. One terse sentence of standard conversational synonyms.>\n\n" \
+ "SYNONYMS:\n" \
+ "<Three to four standard conversational synonyms.>\n\n" \
"EXAMPLES:\n" \
"1. <example 1>\n" \
- "2. <example 2>\n\n" \
- "EXAMPLE INPUT:\n" \
- "Define tumultuous as in 'the species endured a tumultuous period of war and renewal'\n\n" \
- "EXAMPLE OUTPUT:\n" \
- "TUMULTUOUS (adjective) — Literary / Formal\n\n" \
- "DEFINITION:\n" \
- "Marked by wild disorder, chaotic disturbance, or intense emotional and political turmoil.\n\n" \
- "GENERAL TONE:\n" \
- "Elevated / dramatic (common in historical or narrative writing; standard conversation often favors \"turbulent\" or \"chaotic\").\n\n" \
- "EXAMPLES:\n" \
- "1. The species endured a tumultuous period of war and renewal.\n" \
- "2. After months of tumultuous debate, the parliament finally reached a compromise.\n\n" \
- "DO NOT add anything after the examples. DO NOT include the word in the definition."
+ "2. <example 2>\n\n"
#define MAX_TOKENS 300