-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kag_agent' into kag_agent_baseline_impl
- Loading branch information
Showing
115 changed files
with
2,653 additions
and
984 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ | |
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. | ||
|
||
@baifuyu @leywar @yixianlzz | ||
@andylau-55 @leywar @caszkgui @matthewhyx | ||
|
||
/cloudext fuyu.bfy@antgroup.com [email protected] | ||
/python [email protected] [email protected] [email protected] [email protected] | ||
/reasoner [email protected] [email protected] [email protected] [email protected] [email protected] fuyu.bfy@antgroup.com | ||
/builder fuyu.bfy@antgroup.com [email protected] | ||
/server fuyu.bfy@antgroup.com [email protected] [email protected] | ||
/cloudext andy.yj@antgroup.com leywar.liang@antgroup.com [email protected] matthew.hyx@antgroup.com | ||
/python [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] | ||
/reasoner [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] matthew.hyx@antgroup.com | ||
/builder andy.yj@antgroup.com leywar.liang@antgroup.com [email protected] matthew.hyx@antgroup.com | ||
/server andy.yj@antgroup.com [email protected] leywar.liang@antgroup.com caszkgui@gmail.com | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.3-beta2 | ||
0.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
python/knext/knext/ca/logic/modules/default_prompt_template_en/AnswerQuestionWithContext.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Requirements: | ||
1. When answering questions, rely on the information provided in the context below. | ||
2. Answer the questions as directly as possible, without including extraneous information. | ||
3. Do not include information that is only relevant to one aspect. | ||
4. In addition to the context, you can also rely on some common knowledge when answering questions. | ||
5. If the context does not provide relevant information, respond with "No relevant information found," without fabricating an answer. | ||
|
||
Example 1: | ||
llm_input: What is the relationship between Jin Yong and Xu Zhimo? | ||
context: | ||
Everyone knows that Jin Yong and Xu Zhimo are cousins. Jin Yong's mother and Xu Zhimo's father are cousins, and Xu Zhimo is about 27 years older than Jin Yong, so Jin Yong has to call Xu Zhimo his cousin. Jin Yong's original name is Cha Liangyong, and both Jin Yong's and Xu Zhimo's families are wealthy families in Jiangsu and Zhejiang. | ||
llm_output: Cousins | ||
|
||
Example 2: | ||
llm_input: What is the surname of Xie Nan's father? | ||
context: | ||
No information found related to Xie Nan's father | ||
llm_output: Xie | ||
|
||
|
||
Based on the above requirements and examples, answer the following question: | ||
llm_input: $question | ||
context: $context | ||
llm_output: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 OpenSPG Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. | ||
|
||
import click | ||
|
||
from knext.thinker.client import ThinkerClient | ||
|
||
|
||
@click.option("--subject", help="The subject of reasoning goal, eg: id,type or type") | ||
@click.option("--predicate", help="The predicate of reasoning goal, eg: type") | ||
@click.option("--object", help="The object of reasoning goal, eg: id,type or type") | ||
@click.option("--mode", help="Reasoning mode, eg: spo or node") | ||
@click.option("--params", help="Reasoning context") | ||
def execute_thinker_job(subject="", predicate="", object="", mode="spo", params=""): | ||
""" | ||
Submit asynchronous reasoner jobs to server by providing DSL file or string. | ||
""" | ||
client = ThinkerClient() | ||
client.execute(subject, predicate, object, mode, params) |
Oops, something went wrong.