Skip to content

Commit 8fa21c9

Browse files
committed
Rm'd embeddingClassifer.ts. Refined llm prompts in the plot and classify.ts files. Unified PlotType to all be lower case
1 parent ce006f3 commit 8fa21c9

File tree

7 files changed

+60
-727
lines changed

7 files changed

+60
-727
lines changed

server/routes/chat/classify.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import { route_to_appropriate_llm_provider } from './routeAPIcall.ts'
1010
* @returns 'none' | 'resource' | 'plot'
1111
*/
1212
export async function classifyQuery(user_prompt: string, llm: LlmConfig): Promise<QueryClassification> {
13-
const prompt = `Classify the following user query into exactly one of these categories:
14-
- "none": the query is not related to data visualization or dataset analysis
15-
- "resource": the query asks for information, links, documentation, or background about the dataset
16-
- "plot": the query asks for a data visualization or statistical analysis
13+
const prompt = `You are a classifier for a genomics/clinical dataset analysis tool. Classify the following user query into exactly one category.
14+
15+
- "plot": the query asks to visualize, explore, or retrieve data values from the dataset. This includes questions about gene expression, survival, mutations, clinical variables, subtypes, karyotypes, distributions, comparisons, or any question that would be answered by looking at the actual data (e.g. "What are the karyotypes of chr8?", "Show TP53 expression", "How many patients have subtype X?").
16+
- "resource": the query asks for meta-information ABOUT the dataset itself — links, papers, documentation, citations, how to access or download the data, or background about the study. It does NOT include questions about data values or patterns in the data.
17+
- "none": the query is unrelated to genomics, clinical data, or dataset analysis. This includes general knowledge questions, casual conversation, requests for images, or anything not about analyzing a scientific dataset.
1718
1819
Respond with ONLY one word: none, resource, or plot
1920

0 commit comments

Comments
 (0)