mirror of
https://github.com/mtayfur/openwebui-memory-system.git
synced 2026-01-22 06:51:01 +01:00
Refactor SkipDetector category descriptions for enhanced clarity and specificity, updating technical and personal context entries to improve semantic classification and detection accuracy.
This commit is contained in:
@@ -343,68 +343,71 @@ class SkipDetector:
|
|||||||
"""Semantic-based content classifier using zero-shot classification with category descriptions."""
|
"""Semantic-based content classifier using zero-shot classification with category descriptions."""
|
||||||
|
|
||||||
TECHNICAL_CATEGORY_DESCRIPTIONS = [
|
TECHNICAL_CATEGORY_DESCRIPTIONS = [
|
||||||
"Python JavaScript TypeScript React code def class import return function const let var JSX useState useEffect hooks component algorithm implementation optimization",
|
"programming code syntax language implementation algorithm logic function method class variable declaration import module package library framework calculates Fibonacci dynamic programming algorithm implementation optimization",
|
||||||
"singleton pattern thread-safe lazy initialization design pattern factory builder observer strategy decorator adapter",
|
"singleton pattern thread-safe lazy initialization design pattern factory builder observer strategy implementation structure",
|
||||||
"error exception traceback TypeError NullPointerException IndexError segmentation fault core dumped stack overflow output",
|
"error exception traceback TypeError NullPointerException IndexError segmentation fault core dumped stack overflow output",
|
||||||
"HTTP 404 not found 500 server error 403 forbidden 401 unauthorized resource failed endpoint API error response",
|
"HTTP 404 not found 500 server error 403 forbidden 401 unauthorized resource failed endpoint API error response",
|
||||||
"terminal command line shell dollar sudo apt-get npm install docker run git clone kubectl cargo commands execution",
|
"terminal command line shell dollar sudo package install container run version control clone commands execution",
|
||||||
"JSON XML YAML object curly braces nested data array key colon value parsing serialization configuration file",
|
"data format object structure array key value syntax parsing serialization configuration file",
|
||||||
"WebSocket connection established on port 8080 binary message protocol real-time bidirectional server client communication",
|
"WebSocket connection established on port 8080 binary message protocol real-time bidirectional server client communication",
|
||||||
"REST API GraphQL endpoint POST GET PUT DELETE PATCH mutation query request response payload authentication bearer token header",
|
"API endpoint protocol request response payload authentication token header interface specification",
|
||||||
"file path directory /etc /var /usr /home /lib config log bin system32 absolute relative path C:\\ Windows nginx apache server configuration",
|
"file path directory system config log bin absolute relative path operating system",
|
||||||
"algorithm uses binary search tree O(log n) time complexity space hash table array data structures sorting searching big O notation performance analysis insertions deletions traversal",
|
"algorithm uses binary search tree O(log n) time complexity space hash table array implementation data structures",
|
||||||
"markdown horizontal rule separator dashes equals asterisks underscores heading code block formatting hierarchical structure indented subsection",
|
"markdown horizontal rule separator dashes equals asterisks underscores heading code block syntax formatting",
|
||||||
"code block indentation whitespace tabs spaces nested function body class method formatted structured",
|
"code block indentation whitespace tabs spaces nested function body class method formatted structure syntax",
|
||||||
"Kubernetes Docker container deployment manifest spec replicas image registry pods orchestration cluster namespace ECR ECS",
|
"container orchestration cluster service scaling replication load balancer namespace pod deployment infrastructure management",
|
||||||
"SQL database query select insert update delete join where table column row index primary key foreign key constraint schema migration ALTER CREATE DROP connection pool timeout performance",
|
"database query statement table column row index primary key relationship join filter select insert update delete data storage",
|
||||||
"log output stack trace INFO WARN ERROR DEBUG timestamp level server started on port connection failed memory usage module file raised exception caught unhandled error debugging performance monitoring redis nginx milliseconds ms",
|
"log output stack trace INFO WARN ERROR DEBUG timestamp level server started on port connection failed memory usage at line number module file raised exception caught unhandled error debugging",
|
||||||
"regex pattern regular expression match groups capture backslash escape metacharacter wildcard quantifier character class",
|
"regex pattern regular expression match groups capture backslash escape metacharacter wildcard quantifier character class",
|
||||||
"unit test pytest jest mocha assertion expect mock spy fixture describe it beforeEach testing framework suite CI CD pipeline Jenkins GitHub Actions GitLab workflow build deploy automation",
|
"unit test assertion mock fixture test suite test case verification automated testing quality assurance validation framework testing tool",
|
||||||
"git commit push pull merge branch conflict rebase cherry-pick HEAD origin master main develop repository remote npm package.json dependencies version control",
|
"database schema table primary key foreign key constraint index migration ALTER CREATE DROP INSERT UPDATE",
|
||||||
"AWS S3 bucket EC2 instance Lambda function CloudFormation stack template region availability zone IAM role",
|
"version control repository commit branch merge conflict diff patch changelog revision history collaboration workflow development lifecycle",
|
||||||
"environment variables export set env dotenv config process.env NODE_ENV PORT HOST makefile compile gcc clang build system JWT token decode verify secret key debugging authentication security aws",
|
"cloud service platform infrastructure instance region availability zone scaling elasticity distributed system management",
|
||||||
]
|
]
|
||||||
|
|
||||||
INSTRUCTION_CATEGORY_DESCRIPTIONS = [
|
INSTRUCTION_CATEGORY_DESCRIPTIONS = [
|
||||||
"format output return structure organize as JSON YAML CSV table list markdown bullet points numbered list formatting instruction style presentation layout professional tone arrange display",
|
"format output return structure organize as JSON YAML CSV table list markdown bullet points numbered list formatting instruction style presentation layout",
|
||||||
"adjust response make shorter longer simpler detailed comprehensive concise brief condensed expand elaborate more depth trim down reduce length change length modify response",
|
"adjust response make shorter longer simpler detailed comprehensive concise brief condensed summarized expand elaborate more depth trim down reduce length professional tone",
|
||||||
"rewrite rephrase paraphrase previous response output answer again differently instruction reformulate regenerate restate reformulate prior answer",
|
"rewrite rephrase translate summarize paraphrase condense previous response output answer again differently instruction reformulate",
|
||||||
"change tone formal casual technical professional friendly explain like five years old simple conversational academic style adjust tone modify style",
|
"change tone formal casual technical professional friendly explain like five years old simple conversational academic style",
|
||||||
"can you explain that again repeat simpler words break down step by step clarify confused about your answer understand response elaborate show example provide sample explanation",
|
"can you explain that again repeat simpler words break down step by step clarify confused understand elaborate show example provide sample",
|
||||||
"continue keep going more add additional finish complete rest of remaining content conclusion end stop enough that's sufficient continue from where you stopped",
|
"continue keep going more add additional finish complete rest of remaining content conclusion end stop enough that's sufficient",
|
||||||
"translate the output to language convert response to different language translate answer to Spanish French German Italian Japanese Chinese Portuguese Arabic Russian Korean",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
PURE_MATH_CALCULATION_CATEGORY_DESCRIPTIONS = [
|
PURE_MATH_CALCULATION_CATEGORY_DESCRIPTIONS = [
|
||||||
"pure arithmetic explicit numbers calculate solve multiply add subtract divide numeric computation what is 23 plus 456 minus 78 times 9 divided by 3 equals order operations mathematical expression operators",
|
"pure arithmetic explicit numbers calculate solve multiply add subtract divide numeric computation what is 23 plus 456 minus 78 times 9 divided by 3 equals order operations 45 times 67",
|
||||||
|
"mathematical expression numbers operators 2 plus 3 times 4 divided by 5 what is 123 times 456 numeric calculation arithmetic",
|
||||||
"unit conversion numeric values convert 100 kilometers to miles 72 fahrenheit to celsius degrees metric imperial measurement numbers 5 feet 9 inches to centimeters meters height weight pounds kilograms",
|
"unit conversion numeric values convert 100 kilometers to miles 72 fahrenheit to celsius degrees metric imperial measurement numbers 5 feet 9 inches to centimeters meters height weight pounds kilograms",
|
||||||
"percentage calculation explicit numbers what is 25 percent of 800 15 percent of 250 discount price 30 off numeric percentage proportion 15 percent tip on 65.40 bill split check 4 people",
|
"percentage calculation explicit numbers what is 25 percent of 800 15 percent of 250 discount price 30 off numeric percentage proportion 15 percent tip on 65.40 bill split check 4 people",
|
||||||
"algebra equation explicit numbers solve for x variable in equation 2x plus 5 equals 15 quadratic formula discriminant formula ax squared plus bx plus c equals zero numeric coefficient values",
|
"algebra equation explicit numbers solve for x variable in equation 2x plus 5 equals 15 quadratic formula numeric values",
|
||||||
"geometry calculation numeric measurements area of circle radius 5 volume of cube side 10 circumference perimeter numeric dimensions square root of 144 256 cube root 27 64",
|
"geometry calculation numeric measurements area of circle radius 5 volume of cube side 10 circumference perimeter numeric dimensions square root of 144 256 cube root 27 64",
|
||||||
"compound interest calculate savings 5000 dollars annual rate 4 percent years investment growth principal mortgage payment monthly 300000 loan 30 years numeric financial calculation",
|
"compound interest calculate savings 5000 dollars annual rate 4 percent years investment growth principal mortgage payment monthly 300000 loan 30 years numeric financial calculation",
|
||||||
"statistics mean median mode average standard deviation dataset numbers 12 15 18 20 22 calculate distribution probability chance odds numeric",
|
"statistics mean median mode average standard deviation dataset numbers 12 15 18 20 22 calculate distribution probability chance odds numeric",
|
||||||
"calculate BMI body mass index weight 180 pounds height 5 feet 10 inches health metric numeric formula how many days hours minutes between dates time difference duration",
|
"calculate BMI body mass index weight 180 pounds height 5 feet 10 inches health metric numeric formula how many days hours minutes between dates time difference duration",
|
||||||
"what's number squared what is square of number calculate square root cube root power exponent factorial what's 23 squared what is 5 cubed calculate 7 to the power of 3 what's the square of 15 what is 8 squared solve equation calculate derivative integral matrix determinant vector scalar",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
EXPLICIT_TRANSLATION_CATEGORY_DESCRIPTIONS = [
|
EXPLICIT_TRANSLATION_CATEGORY_DESCRIPTIONS = [
|
||||||
"translation instruction with word translate and explicit text to translate in quotes brackets like translate this Hello how are you to Spanish French German Italian Japanese Chinese",
|
"translation instruction with word translate and explicit text to translate in quotes brackets like translate this Hello how are you to foreign language",
|
||||||
"translation request how do you say specific word phrase expression in language like how do you say thank you computer hello goodbye welcome in Spanish French German Italian Japanese",
|
"translation request how do you say specific word phrase expression in language like how do you say thank you computer hello goodbye in foreign language",
|
||||||
"language conversion with word translate convert and text block paragraph source text followed by target language content translation",
|
"language conversion with word translate convert and text block paragraph source text followed by target language content translation",
|
||||||
"what is translation of explicit source text I love you The quick brown fox jumps over lazy dog to foreign language target output result translation service dictionary lookup",
|
"phrase sentence translation with quoted bracketed text translate I am hungry Where is the train station to foreign language",
|
||||||
"translate the following sentence paragraph text give me translation of specific quoted text content phrase sentence translation with quoted bracketed text I am hungry Where is the train station",
|
"what is translation of explicit source text I love you The quick brown fox to foreign language target output result",
|
||||||
"what is foreign language word for computer house beautiful thank you hello goodbye common phrase vocabulary translation Spanish French German Italian Japanese Portuguese Arabic",
|
"translate the following sentence paragraph text to foreign language give me translation of specific text",
|
||||||
|
"what is foreign language word for computer house beautiful thank you hello goodbye common phrase translation",
|
||||||
|
"convert this text sentence paragraph to another language translate sentence paragraph passage to target foreign language output how do I say in foreign language",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
GRAMMAR_PROOFREADING_CATEGORY_DESCRIPTIONS = [
|
GRAMMAR_PROOFREADING_CATEGORY_DESCRIPTIONS = [
|
||||||
"fix the grammar correct this sentence check grammar She don't like Me and him went to the store Their going too the park I has three book proofreading request incorrect text draft check typos errors quoted text passage proofread paragraph Teh quick brown fox misspelling verb tense agreement subject verb pronoun agreement",
|
"proofreading request with incorrect text like fix grammar spelling in this here is my draft check for typos errors in quoted text passage proofread this paragraph Teh quick brown fox misspelling",
|
||||||
"check for typos check spelling proofread this paragraph spelling punctuation check with specific text to review and fix errors mistakes typos in provided passage paragraph document content Teh compnay is veyr successfull recieved mesage comma splice run-on fragment capitalization errors apostrophe quotation marks period semicolon colon",
|
"grammar correction with specific wrong text or sentence like She don't like Their going too the store I has three book incorrect verb tense agreement subject verb agreement",
|
||||||
"correct the punctuation fix punctuation where are you going today I bought apples oranges and bananas error correction like check this text for mistakes review sentence for grammar problems spelling issues punctuation with text passage included",
|
"spelling punctuation check with specific text to review and fix errors mistakes typos in provided passage paragraph document content check spelling punctuation in this",
|
||||||
"is this sentence correct grammatically proper accurate Their going to they're house there their they're usage grammar question does this make sense clear understandable should I use pronoun which pronoun is correct",
|
"error correction like check this text for mistakes review sentence for grammar problems spelling issues with text passage included comma splice run-on fragment",
|
||||||
"proofread my email letter essay document with provided text content check clarity flow coherence readability improve my writing make better enhance structure organization logical flow persuasive argument academic writing professional communication",
|
"is this sentence correct grammatically proper accurate Their going to they're house there their they're usage grammar question does this make sense clear understandable",
|
||||||
|
"proofread my email letter essay document with provided text content check clarity flow coherence readability grammar spelling punctuation improve my writing make better",
|
||||||
|
"correct punctuation comma splice run-on sentence fragment capitalization errors apostrophe quotation marks period semicolon colon usage missing punctuation",
|
||||||
"word choice suggestion better alternative synonym replace improve vocabulary diction phrasing expression more precise accurate appropriate active voice passive voice parallel construction",
|
"word choice suggestion better alternative synonym replace improve vocabulary diction phrasing expression more precise accurate appropriate active voice passive voice parallel construction",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -413,30 +416,36 @@ class SkipDetector:
|
|||||||
"statement about family members by name mentioning spouse children parents siblings relatives grandparents with specific names or family roles relationships",
|
"statement about family members by name mentioning spouse children parents siblings relatives grandparents with specific names or family roles relationships",
|
||||||
"expression of lasting personal feelings emotions core preferences values beliefs principles or dislikes about life situations experiences worldview",
|
"expression of lasting personal feelings emotions core preferences values beliefs principles or dislikes about life situations experiences worldview",
|
||||||
"description of established personal hobbies regular activities consistent interests passions or meaningful pursuits the person does engages in regularly",
|
"description of established personal hobbies regular activities consistent interests passions or meaningful pursuits the person does engages in regularly",
|
||||||
"significant career information about current job position specific workplace company name professional role responsibilities or work situation employment promotion received award won competition",
|
"significant career information about current job position specific workplace company name professional role responsibilities or work situation employment",
|
||||||
"major life plans important personal goals long-term aspirations meaningful future intentions life decisions dreams objectives",
|
"major life plans important personal goals long-term aspirations meaningful future intentions life decisions dreams objectives achievements milestones",
|
||||||
"personal decision experience choice about important life matters relationships family career health or individual circumstances situations",
|
"personal decision experience choice about important life matters relationships family career health or individual circumstances situations",
|
||||||
"meaningful personal story memory reflection about significant past life experiences events moments that shaped the person",
|
"meaningful personal story memory reflection about significant past life experiences events milestones moments that shaped the person",
|
||||||
"personal background information about hometown childhood upbringing education cultural heritage ethnicity or formative life experiences identity graduated from university college",
|
"personal background information about hometown childhood upbringing education cultural heritage ethnicity or formative life experiences identity graduated from university college",
|
||||||
"health information about medical conditions treatments medications ongoing health situations physical attributes wellness fitness or personal healthcare diagnosed with condition",
|
"health information about medical conditions treatments medications ongoing health situations physical attributes wellness fitness or personal healthcare diagnosed with condition",
|
||||||
"personal question seeking advice about specific individual life situations relationships family decisions personal circumstances challenges problems",
|
"personal question seeking advice about specific individual life situations relationships family decisions personal circumstances challenges problems",
|
||||||
"request for recommendations based on stated personal context preferences needs situation location lifestyle or individual requirements specific constraints",
|
"request for recommendations based on stated personal context preferences needs situation location lifestyle or individual requirements specific constraints",
|
||||||
"learning statement expressing personal interest in understanding something new career transition personal development my course my class my school certification degree program studies like I am learning Spanish for move trip taking French lessons for job studying Mandarin because wife speaks it German for university with personal motivation context reason",
|
"learning statement expressing personal interest in understanding something new as part of career transition personal development my course my class my school certification degree program studies",
|
||||||
"question about helping family member child spouse partner or relative with their interests education personal needs activities homework projects",
|
"question about helping family member child spouse partner or relative with their interests education personal needs activities homework projects",
|
||||||
"statement about personal challenges struggles confusion anxiety stress with work tasks technology language skills writing grammar at job workplace professional setting career imposter syndrome self-doubt personal request for help with specific technology problem issue at job workplace personal project with named context like I am having trouble with React at my job working on website",
|
"statement about personal challenges struggles confusion anxiety stress with work tasks technology language skills writing grammar at job workplace or in professional setting career imposter syndrome self-doubt",
|
||||||
"planning party celebration event for my child family member with specific personal context like my daughter birthday party my son graduation anniversary family gathering my anniversary is my birthday is coming my child graduated turned specific date age",
|
"personal language learning like I am learning Spanish for move trip taking French lessons for job studying Mandarin because my wife speaks it German for university with personal motivation context reason",
|
||||||
"relationship status change I got married engaged dating divorced separated with partner spouse boyfriend girlfriend fiancé specific person name",
|
"personal request for help with specific technology problem issue at job workplace or in personal project with named context like I am having trouble with React at my job working on website",
|
||||||
|
"planning party celebration event for my child family member with specific personal context like my daughter birthday party my son graduation wedding anniversary family gathering",
|
||||||
|
"relationship status change I got married engaged dating divorced separated with partner spouse boyfriend girlfriend fiancé specific person name relationship milestone",
|
||||||
"pet ownership statement I adopted got have dog cat bird fish hamster named specific name my pet family animal companion breed age characteristics prefer like love dislike pets",
|
"pet ownership statement I adopted got have dog cat bird fish hamster named specific name my pet family animal companion breed age characteristics prefer like love dislike pets",
|
||||||
"moving relocation I moved am moving to new city country state from previous location with personal reason context job family school live in specific city neighborhood bought rented living arrangements home environment",
|
"moving relocation I moved am moving to new city country state apartment house from previous location with personal reason context job family school live in specific city neighborhood",
|
||||||
"dietary preference restriction I am vegetarian vegan pescatarian gluten-free lactose intolerant allergic to with lasting personal commitment health ethical religious reasons food preferences love hate dislike favorite",
|
"dietary preference restriction I am vegetarian vegan pescatarian gluten-free lactose intolerant allergic to with lasting personal commitment health ethical religious reasons food preferences love hate dislike favorite",
|
||||||
"religious cultural practice I celebrate observe follow Christian Jewish Muslim Hindu Buddhist tradition faith belief spirituality religious identity cultural background",
|
"religious cultural practice I celebrate observe follow Christian Jewish Muslim Hindu Buddhist tradition faith belief spirituality religious identity cultural background",
|
||||||
|
"living situation I live with roommate alone parents family partner bought rented house apartment condo studio living arrangements home environment",
|
||||||
"transportation vehicle I drive own have car specific make model year commute to work school bike bicycle public transit metro bus train",
|
"transportation vehicle I drive own have car specific make model year commute to work school bike bicycle public transit metro bus train",
|
||||||
"financial situation I am saving for house down payment on budget tight money limited funds planning retirement investment portfolio goals financial planning",
|
"financial situation I am saving for house down payment on budget tight money limited funds planning retirement investment portfolio goals financial planning",
|
||||||
"personal project working on book writing novel art music composition hobby with emotional investment meaningful creative pursuit passion skill development I am learning play guitar piano violin instrument speak language coding programming for personal fulfillment enjoyment growth self-improvement",
|
"anniversary birthday milestone my wedding anniversary is my birthday is coming my child graduated turned specific date age celebration special occasion event",
|
||||||
|
"personal project working on book writing novel screenplay painting drawing art music composition hobby with emotional investment meaningful creative pursuit passion",
|
||||||
|
"skill development I am learning play guitar piano violin instrument speak language coding programming for personal fulfillment enjoyment growth self-improvement",
|
||||||
"exercise fitness routine I go to gym run jog yoga pilates swimming regularly established consistent habit activity health wellness physical fitness",
|
"exercise fitness routine I go to gym run jog yoga pilates swimming regularly established consistent habit activity health wellness physical fitness",
|
||||||
"work schedule I work night shift day shift remote from home office hybrid freelance part-time full-time hours schedule arrangement flexibility night owl early bird morning person",
|
"work schedule I work night shift day shift remote from home office hybrid freelance part-time full-time hours schedule arrangement flexibility night owl early bird morning person",
|
||||||
"personal values I care about believe in strongly value support environment sustainability social justice equality causes activism principles ethics morals",
|
"personal values I care about believe in strongly value support environment sustainability social justice equality causes activism principles ethics morals",
|
||||||
"phobias fears I am afraid of scared terrified heights flying airplanes spiders insects enclosed spaces claustrophobia significant lasting fear anxiety",
|
"phobias fears I am afraid of scared terrified heights flying airplanes spiders insects enclosed spaces claustrophobia significant lasting fear anxiety",
|
||||||
|
"personal achievements I got promoted received award won competition completed certification marathon project significant accomplishment milestone success recognition",
|
||||||
"social preferences I am introvert extrovert ambivert prefer small groups large crowds parties socializing alone time solitude personality trait social behavior",
|
"social preferences I am introvert extrovert ambivert prefer small groups large crowds parties socializing alone time solitude personality trait social behavior",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user