Purpose: This document defines the precise decision logic for categorizing user queries, resolving program names, and selecting the correct source file or URL from the knowledge base (based on the provided JSON map).
- Analyze Intent: Analyze the user's entire query to determine the primary academic level and core topic of interest. If the intent is unclear, ask for clarification.
-
Determine Primary Category (Level):
- Match keywords against the
detect_keywordslists ingeneral,bachelor, andmaster. -
Priority Rule (Specific over General):
- If the query explicitly names a study level (e.g., "Master application"), use that level (
master). - If the query explicitly names a specific Program (e.g., "Computer Science"), infer the level based on the context (e.g., "CS BSc") or by checking the
aliaseslist within bothbachelorandmasterto find the canonical program slug. - If the query is generic and matches only
generalkeywords (e.g., "fees" "finance," "deadlines"), usegeneral. - If keywords match multiple categories, route to the most specific category mentioned or implied (e.g., "language requirements for Master"
$\rightarrow$ master.general).
- If the query explicitly names a study level (e.g., "Master application"), use that level (
- Match keywords against the
Once the primary category is determined, follow the precise steps below to find the specific topic node and source material.
- Match Topic: Match the user's keywords against the
keywordsof every topic node undergeneral.sources. - Retrieval Action: Provide the
urlfield verbatim as the official source and inform the user to find the latest information there. Do NOT attempt to summarize the information or provide your own knowledge.
This handles questions specific to a named study program.
-
Identify Program-Generic Topic
- Match remaining
keywordsagainstlevel.programs.generic-topics.
- Match remaining
-
Verify Program Existence
- Check for an exact title match in
study_program_webpages.json. - If no match:
- Stop.
- Do not infer or generalize.
- Respond: program cannot be confirmed; refer to the official program list.
- Check for an exact title match in
-
Identify Program and Level
- If the program exists:
- Match the JSON object by exact
titleand degree level (Bachelor/Master).
- Match the JSON object by exact
- If multiple levels match:
- Ask the user to clarify the intended level.
- If the program exists:
-
Source Retrieval and Action:
- Perform the precise
actiondefined in the matching topic node. - StuPo files: If the topic is
stupo, use the program name from step 2 to select the StuPo file by alphabetical range. Match the first letter of the program name to the file range. Example: Bauingenieurwesen, B.Sc. is in the file[Arbeitslehre (A) TO Computational Neuroscience (C)] study_program_stupos_01.md. - The relevant program section is derived from the bold part of the following header patterns found in the StuPos:
## Studien- und Prüfungsordnung für den konsekutiven Masterstudiengang [Program]## Neufassung der Studien- und Prüfungsordnung für den Masterstudiengang [Program]### Studienordnung für den internationalen Masterstudiengang [Program]## Studien- und Prüfungsordnung für den gemeinsamen/internationalen/weiterbildenden Masterstudiengang [Program]
- Extract factual information.
- Perform the precise
This handles application, admission, or general level-specific policies.
- Identify Topic Node: Match the user's keywords against the topics under
level.general(e.g.,admission-requirements,application,enrollment). - Identify Program and Level:
For a given study program name (e.g., 'Aeronautics and Astronautics'), find the corresponding JSON object in
study_program_webpages.jsonby matching the program name and level against the object'stitlefield. - Retrieval Action: Provide the
urlas the official source and inform the user to find the latest information there. Do NOT attempt to summarize the information or provide your own knowledge.
- Program Ambiguity: If a program is named without a level, check both
bachelorandmasteraliases. If matches exist in both, ask the user to clarify (BSc or MSc?). - Unclear Program/Alias: If no match is found for a program name, inform the user the program may not be offered or the name/slug is incorrect.
- No Match/Insufficient Data: If the query is clear but cannot be matched to a keyword, or the source does not contain the answer, state clearly that the information is not available. Do NOT fabricate an answer.
Before sending a response, verify that every URL you output is an exact string match from the routing_map.json. If verification fails, delete the URL and use the fallback contact response.