{"id":20440718,"url":"https://github.com/zhpmatrix/lic2019-competition","last_synced_at":"2025-06-17T12:36:53.281Z","repository":{"id":117937432,"uuid":"172877618","full_name":"zhpmatrix/lic2019-competition","owner":"zhpmatrix","description":"2019语言与智能技术竞赛-基于知识图谱的主动聊天","archived":false,"fork":false,"pushed_at":"2019-05-24T10:48:40.000Z","size":38,"stargazers_count":115,"open_issues_count":2,"forks_count":29,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T23:11:19.644Z","etag":null,"topics":["chatbot","dialogue-systems","knowledge-graph","lic2019"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhpmatrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-27T08:44:50.000Z","updated_at":"2024-12-03T03:46:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"6cbb887a-11f2-4a4c-af28-7472510a0e64","html_url":"https://github.com/zhpmatrix/lic2019-competition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhpmatrix/lic2019-competition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhpmatrix%2Flic2019-competition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhpmatrix%2Flic2019-competition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhpmatrix%2Flic2019-competition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhpmatrix%2Flic2019-competition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhpmatrix","download_url":"https://codeload.github.com/zhpmatrix/lic2019-competition/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhpmatrix%2Flic2019-competition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260359797,"owners_count":22997373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","dialogue-systems","knowledge-graph","lic2019"],"created_at":"2024-11-15T09:25:54.201Z","updated_at":"2025-06-17T12:36:48.257Z","avatar_url":"https://github.com/zhpmatrix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### 一. 任务形式化\n\n这个赛道的目标是设立基于知识图谱的主动聊天任务。[知识驱动对话-官网地址](http://lic2019.ccf.org.cn/talk)\n\n##### 输入: \n\n对话目标g，其中g=START-\u003eTOPIC\\_A-\u003eTOPIC\\_B;表示机器从冷启动状态主动聊到话题A，然后聊到话题B。意味着在该任务中，由机器主动的引导对话；在该任务中，具体的话题包括电影和娱乐人物主体。\n\n相关知识信息M，其中M=f1,f2,...,fn. 包括三类，分别是：话题A的知识信息，话题B的知识信息，话题A和话题B的关联信息。在该任务中，具体的相关知识信息包括电影票房，导演和评价等，以SPO形式表示。也就是(Subject, Predicate, Object)，即(实体一，谓词，实体二)。\n\n当前对话序列H=u1,u2,...u(t-1)\n\n##### 输出：\n\n机器回复ut.\n\n#### 二.数据介绍(见官方网站)\n\n#### 三.评价方法\n\n自动评估指标和人工评估指标结合。自动评估指标考虑三个层面的度量，分别是字级别(F1-score)，词级别(BLEU)和回复多样性(DISTINCT)。关于回复多样性，还是基于词的计算，不过考察的是生成词的另外一个维度。在参考2中作者这样写道：\n\n_distinct-1 and distinct-2\nare respectively the number of distinct unigrams and bigrams divided by total number of generated words_\n\n#### 四.一般流程\n\n参考PyTorch官方提供的tutorial(见参考4)，从seq2seq的角度解决问题的方法是，将多轮对话拆分成平行句。例如，针对当前对话序列H=u1,u2,...u(t-1)，可以拆分成t-2组样本，分别是：u1-\u003eu2;u2-\u003eu3;...;u(t-2)-\u003eu(t-1);但是，这样的划分方式存在明显的问题是：句子之间的平滑。这应该是一个问题，但是还没有深入思考过。\n\n#### 五.想法实现\n\n目前，重构了PyTorch官方的Chatbot的Tutorial代码，将各个模块解耦出来，顺带发现了一个Bug。在此基础上，准备实现一个baseline，[代码地址](https://github.com/zhpmatrix/lic2019-competition)\n\n实现思路上，主要参考论文《A Knowledge-Grounded Neural Conversation Model》,包括两个主要部分：\n\n第一：如何将知识图谱的信息嵌入到模型中；\n\n第二: memory机制的实现；\n\n\n补充：\n\nIJCAI16的文章《Neural Generative Question Answering》的3.2节提出了两种方式用于输入和KG的交互：\n\n第一: Bilinear Model\n\n第二: CNN-based Matching Model\n\n\n\n参考：\n\n0.www2018,《DKN: Deep Knowledge-Aware Network for News Recommendation》\n\n1.[第六届全国社会媒体处理大会-SMP2017中文人机对话技术评测(ECDT)](http://ir.hit.edu.cn/SMP2017-ECDT)\n\n包含两个任务：用户意图领域分类和特定域任务型人机对话在线评测\n\n2.《A Diversity-Promoting Objective Function for Neural Conversation Models》\n\n3.《A Persona-Based Neural Conversation Model》\n\n4.[chatbot tutorial with pytorch](https://pytorch.org/tutorials/beginner/chatbot_tutorial.html)\n\n\n5.[2018JDDC的对话比赛亚军方案](https://github.com/Dikea/Dialog-System-with-Task-Retrieval-and-Seq2seq)\n\n6.[机器如何猜你所想？阿里小蜜预测平台解密](https://102.alibaba.com/detail?id=193)\n\n7.[拆开阿里小蜜的内核，看智能人机交互的实现逻辑](https://102.alibaba.com/detail?id=114)\n\n8.[一文揭秘！自底向上构建知识图谱全过程\n](https://102.alibaba.com/detail?id=134)\n\n9.[为电商而生的知识图谱，如何感应用户需求？](https://102.alibaba.com/detail?id=179)\n\n10.[健康知识图谱，阿里工程师如何实现？\n](https://102.alibaba.com/detail?id=176)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhpmatrix%2Flic2019-competition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhpmatrix%2Flic2019-competition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhpmatrix%2Flic2019-competition/lists"}