/deepask: Multi-Step Reasoning mit iterativer RAG-Suche
Neuer Discord-Command für tiefe Recherche in 3 Phasen: 1. Initiale Qdrant-Suche mit der Originalfrage 2. LLM generiert Folgefragen, sucht erneut (max 2 Iterationen) 3. Synthese aller gesammelten Chunks zu umfassender Antwort Nutzbar via /deepask oder @bot deepask. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,13 @@ var (
|
||||
{Type: discordgo.ApplicationCommandOptionString, Name: "frage", Description: "Die Frage", Required: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "deepask",
|
||||
Description: "Tiefe Recherche mit Multi-Step Reasoning (mehrere Suchdurchläufe)",
|
||||
Options: []*discordgo.ApplicationCommandOption{
|
||||
{Type: discordgo.ApplicationCommandOptionString, Name: "frage", Description: "Die Frage", Required: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "asknobrain",
|
||||
Description: "Stelle eine Frage direkt ans LLM (ohne Wissensdatenbank)",
|
||||
@@ -449,6 +456,22 @@ func onInteraction(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||
return resp
|
||||
})
|
||||
|
||||
case "deepask":
|
||||
question := data.Options[0].StringValue()
|
||||
channelID := i.ChannelID
|
||||
handleAgentResponse(s, i, func() agents.Response {
|
||||
resp := researchAgent.Handle(agents.Request{
|
||||
Action: agents.ActionDeepAsk,
|
||||
Args: []string{question},
|
||||
History: getHistory(channelID),
|
||||
})
|
||||
if resp.RawAnswer != "" {
|
||||
addToHistory(channelID, "user", question)
|
||||
addToHistory(channelID, "assistant", resp.RawAnswer)
|
||||
}
|
||||
return resp
|
||||
})
|
||||
|
||||
case "asknobrain":
|
||||
handleAskNoBrain(s, i, data.Options[0].StringValue())
|
||||
|
||||
@@ -990,6 +1013,18 @@ func routeMessage(text, author, channelID string) agents.Response {
|
||||
Source: "discord/mention",
|
||||
})
|
||||
|
||||
case "deepask":
|
||||
resp := researchAgent.Handle(agents.Request{
|
||||
Action: agents.ActionDeepAsk,
|
||||
Args: args,
|
||||
History: getHistory(channelID),
|
||||
})
|
||||
if resp.RawAnswer != "" {
|
||||
addToHistory(channelID, "user", strings.Join(args, " "))
|
||||
addToHistory(channelID, "assistant", resp.RawAnswer)
|
||||
}
|
||||
return resp
|
||||
|
||||
default:
|
||||
resp := researchAgent.Handle(agents.Request{
|
||||
Action: agents.ActionQuery,
|
||||
|
||||
Reference in New Issue
Block a user