Skip to content

Commit 7e9c3a0

Browse files
authored
Merge pull request #2093 from milvus-io/preview
Preview
2 parents 5aebc74 + c3f261a commit 7e9c3a0

File tree

3 files changed

+138
-21
lines changed

3 files changed

+138
-21
lines changed

.github/workflows/preview_aws.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
--build-arg MSERVICE_URL=${{ secrets.MSERVICE_URL }} \
7676
--build-arg CMS_BASE_URL=${{ secrets.CMS_BASE_URL }} \
7777
--build-arg REPO_STATICS_KEY=${{ secrets.REPO_STATICS_KEY }} \
78-
--build-arg INKEEP_API_KEY=${{ secrets.INKEEP_API_KEY }} \
78+
--build-arg INKEEP_API_KEY=${{ secrets.INKEEP_API_KEY_DEV }} \
7979
--build-arg IS_PREVIEW=${{ secrets.PREVIEW_SITE }} \
8080
-t milvusdb/milvus-io-dev:${{ steps.generate-tag-name.outputs.docker_tag }}
8181
docker push milvusdb/milvus-io-dev:${{ steps.generate-tag-name.outputs.docker_tag }}

src/hooks/use-inkeep-settings.ts

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {
1010
provideAnswerConfidenceSchema,
1111
salesSignalType,
1212
detectedSalesSignal,
13+
supportSignalType,
14+
detectedSupportSignal,
1315
} from '@/utils/inkeep';
1416
import { zodToJsonSchema } from 'zod-to-json-schema';
1517
import { CONTACT_SALES_URL } from '@/consts/externalLinks';
@@ -103,59 +105,97 @@ export const useInkeepSettings = ({
103105
'Pharse Match',
104106
],
105107
getTools: () => [
108+
// {
109+
// type: 'function',
110+
// function: {
111+
// name: 'provideAnswerConfidence',
112+
// description:
113+
// 'Determine how confident the AI assistant was and whether or not to escalate to humans.',
114+
// parameters: zodToJsonSchema(provideAnswerConfidenceSchema),
115+
// },
116+
// renderMessageButtons: ({ args }) => {
117+
// const confidence = args.answerConfidence;
118+
// if (['not_confident', 'no_sources', 'other'].includes(confidence)) {
119+
// return [
120+
// {
121+
// label: 'New Issue',
122+
// icon: { builtIn: 'IoHelpBuoyOutline' },
123+
// action: {
124+
// type: 'open_link',
125+
// url: 'https://github.com/milvus-io/milvus/issues',
126+
// },
127+
// },
128+
// ];
129+
// }
130+
// return [];
131+
// },
132+
// } as ToolFunction<{
133+
// answerConfidence: string;
134+
// explanation: string;
135+
// }>,
106136
{
107137
type: 'function',
108138
function: {
109-
name: 'provideAnswerConfidence',
139+
name: 'detectSalesSignal',
110140
description:
111-
'Determine how confident the AI assistant was and whether or not to escalate to humans.',
112-
parameters: zodToJsonSchema(provideAnswerConfidenceSchema),
141+
'Identify when users express interest in potentially purchasing a product.',
142+
parameters: zodToJsonSchema(detectedSalesSignal),
113143
},
114144
renderMessageButtons: ({ args }) => {
115-
const confidence = args.answerConfidence;
116-
if (['not_confident', 'no_sources', 'other'].includes(confidence)) {
145+
// If any valid sales signal is detected, show a demo scheduling option
146+
if (args.type && validSalesSignalTypes.includes(args.type)) {
117147
return [
118148
{
119-
label: 'New Issue',
120-
icon: { builtIn: 'IoHelpBuoyOutline' },
149+
label: 'Contact Sales',
150+
icon: { builtIn: 'LuCalendar' },
121151
action: {
122152
type: 'open_link',
123-
url: 'https://github.com/milvus-io/milvus/issues',
153+
url: `${CONTACT_SALES_URL}?contact_sales_traffic_source=milvusBot`,
124154
},
125155
},
126156
];
127157
}
128158
return [];
129159
},
130-
} as ToolFunction<{
131-
answerConfidence: string;
132-
explanation: string;
133-
}>,
160+
} as ToolFunction<{ type: string }>,
134161
{
135162
type: 'function',
136163
function: {
137-
name: 'detectSalesSignal',
164+
name: 'detectSupportSignal',
138165
description:
139-
'Identify when users express interest in potentially purchasing a product.',
140-
parameters: zodToJsonSchema(detectedSalesSignal),
166+
'Detect whether the user is requesting technical support or reporting an issue.',
167+
parameters: zodToJsonSchema(detectedSupportSignal),
141168
},
142169
renderMessageButtons: ({ args }) => {
143-
// If any valid sales signal is detected, show a demo scheduling option
144-
if (args.type && validSalesSignalTypes.includes(args.type)) {
170+
const signal = args?.type;
171+
if (
172+
[
173+
'technical_issue',
174+
'deployment_and_setup',
175+
'system_operations',
176+
'data_and_performance',
177+
'integration_and_solutions',
178+
'ai_low_confidence_or_docs_missing',
179+
'direct_support_request',
180+
].includes(signal)
181+
) {
145182
return [
146183
{
147184
label: 'Talk to Us',
148-
icon: { builtIn: 'LuCalendar' },
185+
icon: { builtIn: 'IoHelpBuoyOutline' },
149186
action: {
150187
type: 'open_link',
151-
url: `${CONTACT_SALES_URL}?contact_sales_traffic_source=milvusBot`,
188+
url: 'https://meetings.hubspot.com/chloe-williams1/milvus-office-hour',
152189
},
153190
},
154191
];
155192
}
156193
return [];
157194
},
158-
} as ToolFunction<{ type: string }>,
195+
} as ToolFunction<{
196+
type: string;
197+
explanation: string;
198+
}>,
159199
],
160200
};
161201

src/utils/inkeep.ts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,86 @@ const detectedSalesSignal = z.object({
126126
type: salesSignalType,
127127
});
128128

129+
const supportSignalType = z
130+
.union([
131+
z.literal('technical_issue').describe(`
132+
The user is reporting a bug, error, crash, timeout, or unexpected system behavior that blocks or disrupts usage.
133+
Examples:
134+
• "Request timed out."
135+
• "Fail to start with docker compose."
136+
• "Pod crashes due to panics when syncing segment"
137+
• "RootCoordClient message key not exist"
138+
• "Failed to load collection."
139+
• "Quota exceeded"
140+
• "Fail to connect S3 with CA certs."
141+
• "Inconsistent search results when topK is large."
142+
`),
143+
144+
z.literal('deployment_and_setup').describe(`
145+
The user is asking about how to install, configure, or tune Milvus.
146+
Examples:
147+
• "How do I configure Milvus to use external MinIO?"
148+
• "How to upgrade from Milvus 2.4 to 2.6?"
149+
• "How do I set resource limits for index nodes?"
150+
`),
151+
152+
z.literal('system_operations').describe(`
153+
The user is asking about managing or operating a running Milvus system, including monitoring, scaling, and maintenance.
154+
• "How do I monitor Milvus metrics in Prometheus/Grafana?"
155+
• "What’s the best way to scale query nodes horizontally?"
156+
• "How can I back up and restore Milvus data?"
157+
• "How to perform rolling upgrades without downtime?"
158+
`),
159+
160+
z.literal('data_and_performance').describe(`
161+
The user is experiencing missing data, incorrect query results, or performance problems.
162+
Examples:
163+
• "Inserted data not returned in query results."
164+
• "Deleted entities still appear in search results."
165+
• "Index building takes 10x longer than expected."
166+
• "Queries take several seconds instead of milliseconds."
167+
`),
168+
169+
z.literal('integration_and_solutions').describe(`
170+
The user is blocked or has questions while integrating Milvus with external systems, frameworks, or building/operating solutions on top of it.
171+
Examples:
172+
• "LangChain integration throws connection errors."
173+
• "Building a semantic search solution but results are poor."
174+
• "Do you support Pinecone migration?"
175+
• "How do I design schema for a product search pipeline?"
176+
`),
177+
178+
z.literal('ai_low_confidence_or_docs_missing').describe(`
179+
The AI assistant was unable to provide a confident or complete answer due to vague input or lack of documentation.
180+
Examples:
181+
• "I don't know."
182+
• "I can't find relevant information in the documentation."
183+
• "You should reach out the community."
184+
• "Let's try something else."
185+
`),
186+
187+
z.literal('direct_support_request').describe(`
188+
The user is explicitly requesting to contact support or asking for human assistance.
189+
Examples:
190+
• "Can I talk to support?"
191+
• "I need help"
192+
• "Is there someone I can speak to?"
193+
`),
194+
])
195+
.describe("General type of support signal detected in the user's message.");
196+
197+
const detectedSupportSignal = z.object({
198+
explanation: z
199+
.string()
200+
.describe('Short justification for why this is a support-related message.'),
201+
type: supportSignalType,
202+
});
203+
129204
export {
130205
answerConfidence,
131206
provideAnswerConfidenceSchema,
132207
salesSignalType,
133208
detectedSalesSignal,
209+
supportSignalType,
210+
detectedSupportSignal,
134211
};

0 commit comments

Comments
 (0)