Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [semantic_splitter] semantic splitter creating empty splits , thus empty inputs which generate LLM invoke errors #394

Open
1 of 2 tasks
epie-godfred opened this issue Mar 5, 2025 · 4 comments

Comments

@epie-godfred
Copy link

epie-godfred commented Mar 5, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Other

What happened

I'm currently running KAG using docker with the following docker-compose file

version: "3.7"
services:
  server:
    restart: always
    image: spg-registry.us-west-1.cr.aliyuncs.com/spg/openspg-server:latest
    container_name: release-openspg-server
    ports:
      - "8887:8887"
    depends_on:
      - mysql
      - neo4j
      - minio
    volumes:
      - /etc/localtime:/etc/localtime:ro
    environment:
      TZ: Europe/Rome
      LANG: C.UTF-8
    command: [
      "java",
      "-Dfile.encoding=UTF-8",
      "-Xms2048m",
      "-Xmx8192m",
      "-jar",
      "arks-sofaboot-0.0.1-SNAPSHOT-executable.jar",
      '--server.repository.impl.jdbc.host=mysql',
      '--server.repository.impl.jdbc.password=openspg',
      '--builder.model.execute.num=5',
      '--cloudext.graphstore.url=neo4j://release-openspg-neo4j:7687?user=neo4j&password=neo4j@openspg&database=neo4j',
      '--cloudext.searchengine.url=neo4j://release-openspg-neo4j:7687?user=neo4j&password=neo4j@openspg&database=neo4j'
    ]

  mysql:
    restart: always
    image: spg-registry.us-west-1.cr.aliyuncs.com/spg/openspg-mysql:latest
    container_name: release-openspg-mysql
    volumes:
      - /etc/localtime:/etc/localtime:ro
      # - $HOME/mysql/data:/var/lib/mysql
    environment:
      TZ: Europe/Rome
      LANG: C.UTF-8
      MYSQL_ROOT_PASSWORD: openspg
      MYSQL_DATABASE: openspg
    ports:
      - "3306:3306"
    command: [
      '--character-set-server=utf8mb4',
      '--collation-server=utf8mb4_general_ci'
    ]

  neo4j:
    restart: always
    image: spg-registry.us-west-1.cr.aliyuncs.com/spg/openspg-neo4j:latest
    container_name: release-openspg-neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      - TZ=Europe/Rome
      - NEO4J_AUTH=neo4j/neo4j@openspg
      - NEO4J_PLUGINS=["apoc"]
      - NEO4J_server_memory_heap_initial__size=1G
      - NEO4J_server_memory_heap_max__size=4G
      - NEO4J_server_memory_pagecache_size=1G
      - NEO4J_apoc_export_file_enabled=true
      - NEO4J_apoc_import_file_enabled=true
      - NEO4J_dbms_security_procedures_unrestricted=*
      - NEO4J_dbms_security_procedures_allowlist=*
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - $HOME/dozerdb/logs:/logs
      # - $HOME/mysql/data:/data

  minio:
    image: spg-registry.us-west-1.cr.aliyuncs.com/spg/openspg-minio:latest
    container_name: release-openspg-minio
    command: server --console-address ":9001" /data
    restart: always
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio@openspg
      TZ: Europe/Rome
    ports:
      - 9000:9000
      - 9001:9001
    volumes:
      - /etc/localtime:/etc/localtime:ro

with the following configurations for the models

openie_llm: &openie_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

chat_llm: &chat_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

vectorize_model: &vectorize_model
  api_key: <openai_api_key>
  base_url: https://api.openai.com/v1
  model: text-embedding-3-small
  type: openai
  vector_dimensions: 1024
vectorizer: *vectorize_model

Case when the input is not empty :

2025-03-05 11:08:51(172.24.0.5): Task scheduling completed. cost:8 ms !
2025-03-05 11:08:51(172.24.0.5): Lock released successfully!
2025-03-05 11:08:51(172.24.0.5): Splitter task trace log:
pemja.core.PythonException: <class 'RuntimeError'>: LLM invoke exception, info: Expecting value: line 1 column 1 (char 0)
llm input: 

{
    "instruction": "
Please understand the content of the text in the input field, recognize the structure and components of the text, and determine the segmentation points according to the semantic theme, dividing it into several non-overlapping sections. If the article has recognizable structural information such as chapters, please divide it according to the top-level structure.
Please return the results according to the schema definition, including summaries and starting points of the sections. The format must be a JSON string. Please follow the examples given in the example field.",
    "schema": {
        "Section Summary": "A brief summary of the section text",
        "Section Starting Point": "The starting point of the section in the original text, limited to about 20 characters. This segmentation point will be used to split the original text, so it must be found in the original text!"
    },
    "input": "1
A cura dell'Area Programmazione e Statistica
Con il contributo, per la redazione degli strumenti di programmazione relativi all'attività istituzionale dell'Ente, di:
Area Personale e Organizzazione
Area Risorse Finanziarie
Area Quartieri
Area Educazione, Istruzione e Nuove Generazioni
Area Segreteria Generale, Partecipate e Appalti
Area Sicurezza Urbana Integrata
Dipartimento Welfare e Promozione del benessere della comunità
Dipartimento Lavori Pubblici, Verde e Mobilità
Dipartimento Cultura, Sport e Promozione della Città
Dipartimento Urbanistica, Casa, Ambiente e Patrimonio
Direzione Generale
Settore Economia
Settore Innovazione digitale e dati
Settore Innovazione e semplificazione amministrativa e cura delle relazioni con il cittadino
Segretario Generale
Settore Staff del Consiglio Comunale
Settore Gabinetto del Sindaco
Settore Avvocatura
Immagine di copertina - Giorgio Bianchi - Comune di Bologna
2",
    "example": [
        {
            "input": "Jay Chou (Jay Chou), born on January 18, 1979, in Xinbei City, Taiwan Province, originally from Yongchun County, Fujian Province, is a Mandopop male singer, musician, actor, director, screenwriter, and a graduate of Tamkang Senior High School.
In 2000, recommended by Yang Junrong, Jay Chou started singing his own compositions.",
            "output": [
                {
                    "Section Summary": "Personal Introduction",
                    "Section Starting Point": "Jay Chou (Jay Chou), born on January 18"
                },
                {
                    "Section Summary": "Career Start",
                    "Section Starting Point": "
In 2000, recommended by Yang Junrong"
                }
            ]
        },
        {
            "input": "Hangzhou Flexible Employment Personnel Housing Provident Fund Management Measures (Trial)
To expand the benefits of the housing provident fund system and support flexible employment personnel to solve housing problems, according to the State Council's 'Housing Provident Fund Management Regulations', 'Zhejiang Province Housing Provident Fund Regulations' and the relevant provisions and requirements of the Ministry of Housing and Urban-Rural Development and the Zhejiang Provincial Department of Housing and Urban-Rural Development on flexible employment personnel participating in the housing provident fund system, combined with the actual situation in Hangzhou, this method is formulated.
1. This method applies to the voluntary deposit, use, and management of the housing provident fund for flexible employment personnel within the administrative region of this city.
2. The flexible employment personnel referred to in this method are those who are within the administrative region of this city, aged 16 and above, and males under 60 and females under 55, with full civil capacity, and employed in a flexible manner such as part-time, self-employed, or in new forms of employment.
3. Flexible employment personnel applying to deposit the housing provident fund should apply to the Hangzhou Housing Provident Fund Management Center (hereinafter referred to as the Provident Fund Center) for deposit registration procedures and set up personal accounts.",
            "output": [
                {
                    "Section Summary": "Background and Basis for Formulating the Management Measures",
                    "Section Starting Point": "To expand the benefits of the housing provident fund system"
                },
                {
                    "Section Summary": "Scope of Application of the Management Measures",
                    "Section Starting Point": "1. This method applies to the voluntary deposit"
                },
                {
                    "Section Summary": "Definition of Flexible Employment Personnel",
                    "Section Starting Point": "2. The flexible employment personnel referred to in this method"
                },
                {
                    "Section Summary": "Procedures for Flexible Employment Personnel to Register for Deposit",
                    "Section Starting Point": "3. Flexible employment personnel applying to deposit the housing provident fund"
                }
            ]
        }
    ]
}    
    
llm output: 

	at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:48)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/builder/base.invoke(base.py:114)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter._invoke(semantic_splitter.py:157)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter.semantic_chunk(semantic_splitter.py:119)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/common/llm_client.invoke(llm_client.py:117)
	at pemja.core.PythonInterpreter.invokeMethod(Native Method)
	at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
	at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.splitterChunk(KagSplitterAsyncTask.java:217)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:179)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:142)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.executeTask(MemoryTaskServer.java:67)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.lambda$submit$0(MemoryTaskServer.java:56)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

2025-03-05 11:08:51(172.24.0.5): Splitter task status is ERROR
2025-03-05 11:08:51(172.24.0.5): The asynchronous task has been created! resource:builder/project_2/instance_10/56_kagSplitterAsyncTask.kag
2025-03-05 11:08:51(172.24.0.5): Lock preempted successfully!

Another similar error

2025-03-05 11:08:51(172.24.0.5): Task scheduling completed. cost:8 ms !
2025-03-05 11:08:51(172.24.0.5): Lock released successfully!
2025-03-05 11:08:51(172.24.0.5): Splitter task trace log:
pemja.core.PythonException: <class 'RuntimeError'>: LLM invoke exception, info: Expecting value: line 1 column 1 (char 0)
llm input: 

{
    "instruction": "
Please understand the content of the text in the input field, recognize the structure and components of the text, and determine the segmentation points according to the semantic theme, dividing it into several non-overlapping sections. If the article has recognizable structural information such as chapters, please divide it according to the top-level structure.
Please return the results according to the schema definition, including summaries and starting points of the sections. The format must be a JSON string. Please follow the examples given in the example field.",
    "schema": {
        "Section Summary": "A brief summary of the section text",
        "Section Starting Point": "The starting point of the section in the original text, limited to about 20 characters. This segmentation point will be used to split the original text, so it must be found in the original text!"
    },
    "input": "1
A cura dell'Area Programmazione e Statistica
Con il contributo, per la redazione degli strumenti di programmazione relativi all'attività istituzionale dell'Ente, di:
Area Personale e Organizzazione
Area Risorse Finanziarie
Area Quartieri
Area Educazione, Istruzione e Nuove Generazioni
Area Segreteria Generale, Partecipate e Appalti
Area Sicurezza Urbana Integrata
Dipartimento Welfare e Promozione del benessere della comunità
Dipartimento Lavori Pubblici, Verde e Mobilità
Dipartimento Cultura, Sport e Promozione della Città
Dipartimento Urbanistica, Casa, Ambiente e Patrimonio
Direzione Generale
Settore Economia
Settore Innovazione digitale e dati
Settore Innovazione e semplificazione amministrativa e cura delle relazioni con il cittadino
Segretario Generale
Settore Staff del Consiglio Comunale
Settore Gabinetto del Sindaco
Settore Avvocatura
Immagine di copertina - Giorgio Bianchi - Comune di Bologna
2",
    "example": [
        {
            "input": "Jay Chou (Jay Chou), born on January 18, 1979, in Xinbei City, Taiwan Province, originally from Yongchun County, Fujian Province, is a Mandopop male singer, musician, actor, director, screenwriter, and a graduate of Tamkang Senior High School.
In 2000, recommended by Yang Junrong, Jay Chou started singing his own compositions.",
            "output": [
                {
                    "Section Summary": "Personal Introduction",
                    "Section Starting Point": "Jay Chou (Jay Chou), born on January 18"
                },
                {
                    "Section Summary": "Career Start",
                    "Section Starting Point": "
In 2000, recommended by Yang Junrong"
                }
            ]
        },
        {
            "input": "Hangzhou Flexible Employment Personnel Housing Provident Fund Management Measures (Trial)
To expand the benefits of the housing provident fund system and support flexible employment personnel to solve housing problems, according to the State Council's 'Housing Provident Fund Management Regulations', 'Zhejiang Province Housing Provident Fund Regulations' and the relevant provisions and requirements of the Ministry of Housing and Urban-Rural Development and the Zhejiang Provincial Department of Housing and Urban-Rural Development on flexible employment personnel participating in the housing provident fund system, combined with the actual situation in Hangzhou, this method is formulated.
1. This method applies to the voluntary deposit, use, and management of the housing provident fund for flexible employment personnel within the administrative region of this city.
2. The flexible employment personnel referred to in this method are those who are within the administrative region of this city, aged 16 and above, and males under 60 and females under 55, with full civil capacity, and employed in a flexible manner such as part-time, self-employed, or in new forms of employment.
3. Flexible employment personnel applying to deposit the housing provident fund should apply to the Hangzhou Housing Provident Fund Management Center (hereinafter referred to as the Provident Fund Center) for deposit registration procedures and set up personal accounts.",
            "output": [
                {
                    "Section Summary": "Background and Basis for Formulating the Management Measures",
                    "Section Starting Point": "To expand the benefits of the housing provident fund system"
                },
                {
                    "Section Summary": "Scope of Application of the Management Measures",
                    "Section Starting Point": "1. This method applies to the voluntary deposit"
                },
                {
                    "Section Summary": "Definition of Flexible Employment Personnel",
                    "Section Starting Point": "2. The flexible employment personnel referred to in this method"
                },
                {
                    "Section Summary": "Procedures for Flexible Employment Personnel to Register for Deposit",
                    "Section Starting Point": "3. Flexible employment personnel applying to deposit the housing provident fund"
                }
            ]
        }
    ]
}    
    
llm output: 

	at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:48)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/builder/base.invoke(base.py:114)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter._invoke(semantic_splitter.py:157)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter.semantic_chunk(semantic_splitter.py:119)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/common/llm_client.invoke(llm_client.py:117)
	at pemja.core.PythonInterpreter.invokeMethod(Native Method)
	at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
	at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.splitterChunk(KagSplitterAsyncTask.java:217)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:179)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:142)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.executeTask(MemoryTaskServer.java:67)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.lambda$submit$0(MemoryTaskServer.java:56)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

2025-03-05 11:08:51(172.24.0.5): Splitter task status is ERROR
2025-03-05 11:08:51(172.24.0.5): The asynchronous task has been created! resource:builder/project_2/instance_10/56_kagSplitterAsyncTask.kag
2025-03-05 11:08:51(172.24.0.5): Lock preempted successfully!

markdown document to be added to knowledge base attached.

I tried changing the split_length parameter from default 20000 to 100000 but still get the same error. What can I do to resolve this?

How to reproduce

Steps to reproduce the error:

  • setup using configs shared above
  • create task on Knowledge Base Build UI using the document provided with the split_legth provided
  • error :
Reader

2025-03-05 11:08:27(172.24.0.5): Task scheduling completed. cost:4588 ms !
2025-03-05 11:08:27(172.24.0.5): Lock released successfully!
2025-03-05 11:08:27(172.24.0.5): Store the results of the read operator. file:builder/builder/project_2/instance_10/55_kagReaderSyncTask.kag
2025-03-05 11:08:27(172.24.0.5): The read operator was invoked successfully. chunk size:1...Expand
Splitter

2025-03-05 11:23:51(172.24.0.5): Task scheduling completed. cost:6 ms !
2025-03-05 11:23:51(172.24.0.5): Lock released successfully!
2025-03-05 11:23:51(172.24.0.5): Splitter task trace log:
pemja.core.PythonException: <class 'RuntimeError'>: LLM invoke exception, info: Expecting value: line 1 column 1 (char 0)
llm input: 

{
   "instruction": "
Please understand the content of the text in the input field, recognize the structure and components of the text, and determine the segmentation points according to the semantic theme, dividing it into several non-overlapping sections. If the article has recognizable structural information such as chapters, please divide it according to the top-level structure.
Please return the results according to the schema definition, including summaries and starting points of the sections. The format must be a JSON string. Please follow the examples given in the example field.",
   "schema": {
       "Section Summary": "A brief summary of the section text",
       "Section Starting Point": "The starting point of the section in the original text, limited to about 20 characters. This segmentation point will be used to split the original text, so it must be found in the original text!"
   },
   "input": "In questo capitolo si analizza la situazione demografica, sociale, economica e ambientale del territorio bolognese, con l'obiettivo di fornire informazioni e dati per orientare la programmazione. Nel capitolo vengono in particolare messi in evidenza alcuni dati di contesti relativi alle donne e alle giovani generazioni.",
   "example": [
       {
           "input": "Jay Chou (Jay Chou), born on January 18, 1979, in Xinbei City, Taiwan Province, originally from Yongchun County, Fujian Province, is a Mandopop male singer, musician, actor, director, screenwriter, and a graduate of Tamkang Senior High School.
In 2000, recommended by Yang Junrong, Jay Chou started singing his own compositions.",
           "output": [
               {
                   "Section Summary": "Personal Introduction",
                   "Section Starting Point": "Jay Chou (Jay Chou), born on January 18"
               },
               {
                   "Section Summary": "Career Start",
                   "Section Starting Point": "
In 2000, recommended by Yang Junrong"
               }
           ]
       },
       {
           "input": "Hangzhou Flexible Employment Personnel Housing Provident Fund Management Measures (Trial)
To expand the benefits of the housing provident fund system and support flexible employment personnel to solve housing problems, according to the State Council's 'Housing Provident Fund Management Regulations', 'Zhejiang Province Housing Provident Fund Regulations' and the relevant provisions and requirements of the Ministry of Housing and Urban-Rural Development and the Zhejiang Provincial Department of Housing and Urban-Rural Development on flexible employment personnel participating in the housing provident fund system, combined with the actual situation in Hangzhou, this method is formulated.
1. This method applies to the voluntary deposit, use, and management of the housing provident fund for flexible employment personnel within the administrative region of this city.
2. The flexible employment personnel referred to in this method are those who are within the administrative region of this city, aged 16 and above, and males under 60 and females under 55, with full civil capacity, and employed in a flexible manner such as part-time, self-employed, or in new forms of employment.
3. Flexible employment personnel applying to deposit the housing provident fund should apply to the Hangzhou Housing Provident Fund Management Center (hereinafter referred to as the Provident Fund Center) for deposit registration procedures and set up personal accounts.",
           "output": [
               {
                   "Section Summary": "Background and Basis for Formulating the Management Measures",
                   "Section Starting Point": "To expand the benefits of the housing provident fund system"
               },
               {
                   "Section Summary": "Scope of Application of the Management Measures",
                   "Section Starting Point": "1. This method applies to the voluntary deposit"
               },
               {
                   "Section Summary": "Definition of Flexible Employment Personnel",
                   "Section Starting Point": "2. The flexible employment personnel referred to in this method"
               },
               {
                   "Section Summary": "Procedures for Flexible Employment Personnel to Register for Deposit",
                   "Section Starting Point": "3. Flexible employment personnel applying to deposit the housing provident fund"
               }
           ]
       }
   ]
}    
   
llm output: 

   at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:48)
   at /openspg_venv/lib/python3.8/site-packages/kag/interface/builder/base.invoke(base.py:114)
   at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter._invoke(semantic_splitter.py:157)
   at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter.semantic_chunk(semantic_splitter.py:119)
   at /openspg_venv/lib/python3.8/site-packages/kag/interface/common/llm_client.invoke(llm_client.py:117)
   at pemja.core.PythonInterpreter.invokeMethod(Native Method)
   at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
   at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.splitterChunk(KagSplitterAsyncTask.java:217)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:179)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:142)
   at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.executeTask(MemoryTaskServer.java:67)
   at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.lambda$submit$0(MemoryTaskServer.java:56)
   at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:750)

2025-03-05 11:23:51(172.24.0.5): Splitter task status is ERROR
2025-03-05 11:23:51(172.24.0.5): The asynchronous task has been created! resource:builder/project_2/instance_10/56_kagSplitterAsyncTask.kag
2025-03-05 11:23:51(172.24.0.5): Lock preempted successfully!

2025-03-05 11:22:51(172.24.0.5): Task scheduling completed. cost:11 ms !
2025-03-05 11:22:51(172.24.0.5): Lock released successfully!
2025-03-05 11:22:51(172.24.0.5): Splitter task has been successfully created!
2025-03-05 11:22:51(172.24.0.5): Splitter task execute failed, recreating……
2025-03-05 11:22:51(172.24.0.5): Splitter task trace log:
pemja.core.PythonException: <class 'RuntimeError'>: LLM invoke exception, info: Expecting value: line 1 column 1 (char 0)
llm input: 

{
   "instruction": "
Please understand the content of the text in the input field, recognize the structure and components of the text, and determine the segmentation points according to the semantic theme, dividing it into several non-overlapping sections. If the article has recognizable structural information such as chapters, please divide it according to the top-level structure.
Please return the results according to the schema definition, including summaries and starting points of the sections. The format must be a JSON string. Please follow the examples given in the example field.",
   "schema": {
       "Section Summary": "A brief summary of the section text",
       "Section Starting Point": "The starting point of the section in the original text, limited to about 20 characters. This segmentation point will be used to split the original text, so it must be found in the original text!"
   },
   "input": "7
8
9

| Premessa  ..................................................................................................................................................................  6 Sezione Strategica - Analisi delle condizioni esterne all'ente ..................................................................................  9 | Premessa  ..................................................................................................................................................................  6 Sezione Strategica - Analisi delle condizioni esterne all'ente ..................................................................................  9 |
| --- | --- |
| Il contesto demografico, sociale, economico e l'ambiente ..........................................................................  10 | Il contesto demografico, sociale, economico e l'ambiente ..........................................................................  10 |
| 1.1 La situazione demografica ...................................................................................................................... 10 | 1.1 La situazione demografica ...................................................................................................................... 10 |
| 1.2 La situazione economica  ......................................................................................................................... 11 | 1.2 La situazione economica  ......................................................................................................................... 11 |
| 1.2.1 Lo scenario economico  .................................................................................................................. 11 | 1.2.1 Lo scenario economico  .................................................................................................................. 11 |
| Le imprese ..................................................................................................................................... 13 | Le imprese ..................................................................................................................................... 13 |
| Il commercio estero ...................................................................................................................... 14 | Il commercio estero ...................................................................................................................... 14 |
| Il lavoro  .......................................................................................................................................... 15 | Il lavoro  .......................................................................................................................................... 15 |
| L'inflazione .................................................................................................................................... 16 | L'inflazione .................................................................................................................................... 16 |
| I redditi .......................................................................................................................................... 17 | I redditi .......................................................................................................................................... 17 |
| Il turismo ....................................................................................................................................... 18 | Il turismo ....................................................................................................................................... 18 |
| L'Aeroporto ................................................................................................................................... 19 | L'Aeroporto ................................................................................................................................... 19 |
| 1.2.9 Il mercato immobiliare .................................................................................................................. 20 | 1.2.9 Il mercato immobiliare .................................................................................................................. 20 |
| 1.3 L'ambiente .............................................................................................................................................. 22 | 1.3 L'ambiente .............................................................................................................................................. 22 |
| L'ambiente .................................................................................................................................... 22 | L'ambiente .................................................................................................................................... 22 |
| La mobilità  ..................................................................................................................................... 23 | La mobilità  ..................................................................................................................................... 23 |
| L'Indagine sulla qualità della vita dei cittadini e delle cittadine del Comune e della Città Metropolitana di | L'Indagine sulla qualità della vita dei cittadini e delle cittadine del Comune e della Città Metropolitana di |
| Bologna nel 2023 ...................................................................................................................................................  30 | Bologna nel 2023 ...................................................................................................................................................  30 |
| 3 Gli obiettivi nazionali e regionali ..................................................................................................................  41 | 3 Gli obiettivi nazionali e regionali ..................................................................................................................  41 |
| 4 Lo sviluppo sostenibile, un paradigma per il presente e per il futuro ..........................................................  44 | 4 Lo sviluppo sostenibile, un paradigma per il presente e per il futuro ..........................................................  44 |
| L'Agenda 2030: un programma d'azione globale ................................................................................... 45 L'Agenda 2030: un'analisi sullo stato di avanzamento degli Obiettivi di sviluppo sostenibile nel nostro | L'Agenda 2030: un programma d'azione globale ................................................................................... 45 L'Agenda 2030: un'analisi sullo stato di avanzamento degli Obiettivi di sviluppo sostenibile nel nostro |
| 4.2 Paese  48 | 4.2 Paese  48 |
| 4.3 La strategia territoriale per lo sviluppo sostenibile: verso un modello di governo del Valore Pubblico 50 | 4.3 La strategia territoriale per lo sviluppo sostenibile: verso un modello di governo del Valore Pubblico 50 |
| Il percorso verso la costruzione di una Agenda Territoriale per lo Sviluppo sostenibile .............. 51 | Il percorso verso la costruzione di una Agenda Territoriale per lo Sviluppo sostenibile .............. 51 |
| 4.3.2 Il Valore Pubblico come 'stella polare' cui far convergere la Programmazione .......................... 68 | 4.3.2 Il Valore Pubblico come 'stella polare' cui far convergere la Programmazione .......................... 68 |
| 4.4 La centralità della programmazione per le donne e per le giovani generazioni  ..................................... 69 | 4.4 La centralità della programmazione per le donne e per le giovani generazioni  ..................................... 69 |
| Lo sviluppo sostenibile richiede l'uguaglianza di genere .............................................................. 69 | Lo sviluppo sostenibile richiede l'uguaglianza di genere .............................................................. 69 |
| Lo sviluppo sostenibile richiede equità intergenerazionale  .......................................................... 71 | Lo sviluppo sostenibile richiede equità intergenerazionale  .......................................................... 71 |
| Il Piano Nazionale di Ripresa e Resilienza (PNRR): luci ed ombre  ........................................................... 74 | Il Piano Nazionale di Ripresa e Resilienza (PNRR): luci ed ombre  ........................................................... 74 |
| 4.5.1 I progetti PNRR in città .................................................................................................................. 75 | 4.5.1 I progetti PNRR in città .................................................................................................................. 75 |
| Sezione Strategica - Analisi delle condizioni interne all'ente  .................................................................................  92 | Sezione Strategica - Analisi delle condizioni interne all'ente  .................................................................................  92 |
| Gli obiettivi strategici per il mandato ...........................................................................................................  93 | Gli obiettivi strategici per il mandato ...........................................................................................................  93 |
| 5.1 Equità, inclusione sociale e territoriale .................................................................................................. 95 | 5.1 Equità, inclusione sociale e territoriale .................................................................................................. 95 |
| Educazione, istruzione e formazione  .................................................................................................... 102 | Educazione, istruzione e formazione  .................................................................................................... 102 |
|  |  |
| Salute .................................................................................................................................................... 105 | Salute .................................................................................................................................................... 105 |
| Digitalizzazione e innovazione .............................................................................................................. 112 | Digitalizzazione e innovazione .............................................................................................................. 112 |
| 5.6 Il governo dello sviluppo della città ...................................................................................................... 116 | 5.6 Il governo dello sviluppo della città ...................................................................................................... 116 |
| Gli indirizzi generali per le società controllate e partecipate e per gli enti strumentali.............................  119 | Gli indirizzi generali per le società controllate e partecipate e per gli enti strumentali.............................  119 |
| 6.1 Le partecipazioni societarie del Comune di Bologna ............................................................................ 119 | 6.1 Le partecipazioni societarie del Comune di Bologna ............................................................................ 119 |
| 6.1.1 Aeroporto G. Marconi di Bologna  SpA ....................................................................................... 122 | 6.1.1 Aeroporto G. Marconi di Bologna  SpA ....................................................................................... 122 |
| AFM SpA ...................................................................................................................................... 124 | AFM SpA ...................................................................................................................................... 124 |
| ATC SpA in liquidazione  ............................................................................................................... 127 | ATC SpA in liquidazione  ............................................................................................................... 127 |
| Bologna Servizi Cimiteriali - BSC Srl  ............................................................................................. 134 | Bologna Servizi Cimiteriali - BSC Srl  ............................................................................................. 134 |
| BOLOGNA SERVIZI FUNERARI srl - BSF srl.................................................................................... 141 | BOLOGNA SERVIZI FUNERARI srl - BSF srl.................................................................................... 141 |


| 6.1.7 | Centro Agro Alimentare Bologna - CAAB spa .............................................................................. 144 |
| --- | --- |
| 6.1.8 | FBM - Finanziaria Bologna Metropolitana SpA in liquidazione ................................................... 151 |
| 6.1.9 | Fiere Internazionali di Bologna-  Bologna Fiere  SpA .................................................................. 153 |
| 6.1.10 | Hera SpA ................................................................................................................................. 157 |
| 6.1.11 | INTERPORTO Spa .................................................................................................................... 160 |
| 6.1.12 | Lepida Scpa  ............................................................................................................................. 166 |
| 6.1.13 | L'IMMAGINE RITROVATA Srl................................................................................................... 173 |
| 6.1.14 | SRM Srl ................................................................................................................................... 175 |
| 6.1.15 | TPER SpA  ................................................................................................................................. 182 |
| 6.2 Gli indirizzi per gli enti strumentali  ....................................................................................................... 186 | 6.2 Gli indirizzi per gli enti strumentali  ....................................................................................................... 186 |
| 6.2.1 Fondazione ERT ........................................................................................................................... 186 | 6.2.1 Fondazione ERT ........................................................................................................................... 186 |
| 6.2.2 | Fondazione Cineteca di Bologna ................................................................................................. 188 |
| 6.2.3 | Fondazione Teatro Comunale Bologna ....................................................................................... 190 |
| 6.2.4 | Fondazione per l'Innovazione Urbana ........................................................................................ 192 |
| 6.2.5 | ASP Città di Bologna .................................................................................................................... 193 |
| 6.2.6 | ACER - Azienda Casa Emilia-Romagna della provincia di Bologna............................................... 197 |
| Il contesto di riferimento per il personale  ..................................................................................................  200 | Il contesto di riferimento per il personale  ..................................................................................................  200 |
| 7.1 Il contesto organizzativo  ....................................................................................................................... 200 | 7.1 Il contesto organizzativo  ....................................................................................................................... 200 |
| Prevenzione della corruzione e trasparenza dell'azione amministrativa e legalità democratica ..............  216 | Prevenzione della corruzione e trasparenza dell'azione amministrativa e legalità democratica ..............  216 |
| Sezione operativa - Parte 1 .................................................................................................................................  218 | Sezione operativa - Parte 1 .................................................................................................................................  218 |
| 9.1 Previsioni di Entrata  .............................................................................................................................. 219 | 9.1 Previsioni di Entrata  .............................................................................................................................. 219 |
| 9.1.1 | Entrate correnti ........................................................................................................................... 219 |
| 9.1.2 | Entrate in conto capitale ............................................................................................................. 223 |
| 9.1.3 Riepilogo delle Entrate ................................................................................................................ 224 | 9.1.3 Riepilogo delle Entrate ................................................................................................................ 224 |
| 9.2 Previsioni di Spesa ................................................................................................................................ 225 | 9.2 Previsioni di Spesa ................................................................................................................................ 225 |
| 9.2.1 | Spesa corrente ............................................................................................................................ 225 |
| 9.2.3 |  |
|  | Spese per investimenti ................................................................................................................ 227 |
| 10 Indirizzi per i programmi obiettivo dei Quartieri per il triennio 2024-2026  ...............................................  228 | 10 Indirizzi per i programmi obiettivo dei Quartieri per il triennio 2024-2026  ...............................................  228 |
| 10.1 Inquadramento territoriale e profilo della comunità ...................................................................... 228 | 10.1 Inquadramento territoriale e profilo della comunità ...................................................................... 228 |
| 10.1.1 | Lo scenario economico e finanziario ...................................................................................... 228 |
| 10.1.2 Le principali tendenze demografiche ..................................................................................... 228 | 10.1.2 Le principali tendenze demografiche ..................................................................................... 228 |
| 10.2 Le linee di indirizzo  ........................................................................................................................... 235 | 10.2 Le linee di indirizzo  ........................................................................................................................... 235 |
|  | Piano dei Quartieri ................................................................................................................. 236 |
| 10.2.2 |  |
| 10.2.3 | Bologna verde e sostenibile ................................................................................................... 240 |
| 10.2.3.1 | Programmazione triennale dei lavori pubblici e degli investimenti 2024-2026 ................................ 240 |
| 10.2.3.2 | Trasformazioni territoriali rilevanti nel triennio  ................................................................................ 242 |
| 10.2.3.3 | I principali interventi di mobilità urbana ........................................................................................... 251 |
| 10.2.3.4 | Cura del territorio e sicurezza integrata  ............................................................................................ 254 |
| 10.2.3.5 | Bologna Missione Clima .................................................................................................................... 256 |
| 10.2.4 | Bologna educativa, culturale e sportiva - Bologna che cresce per tutte e per tutti ............... 258 |
| 10.2.4.1 | Attività culturali  ................................................................................................................................. 258 |
| 10.2.4.2 | Biblioteche e welfare culturale  .......................................................................................................... 261 |
| 10.2.4.3 | Sport e benessere di comunità  .......................................................................................................... 265 |
| 10.2.4.4 | Promozione e gestione interventi educativi  ...................................................................................... 266 |
| 10.2.5 | Bologna per il diritto alla salute e alla fragilità ....................................................................... 270 |
| 10.2.5.1 | Promozione e gestione degli interventi in ambito sociale  ................................................................. 272 |
| 10.2.5.2 | Promozione della salute, benessere e autonomia della persona ...................................................... 273 |
| 10.2.6 | Bologna vicina e connessa  ...................................................................................................... 274 |
| 10.2.6.1 | Promozione dell'Amministrazione condivisa..................................................................................... 274 |
| 10.2.6.2 | Promozione delle pari opportunità, tutela delle differenze, e contrasto alla violenza di genere ..... 279 |


|  | 10.2.6.3 Promozione dei diritti umani e dei diritti di cittadinanza, di integrazione interculturale e di contrasto  alle discriminazioni ................................................................................................................................................. 279 |
| --- | --- |
| 10.3 | Budget 2024 - 2026: risorse attribuite direttamente ai Quartieri e quelle complessivamente |
| destinate ad interventi socio assistenziali ed educativi ................................................................................. 282 | destinate ad interventi socio assistenziali ed educativi ................................................................................. 282 |
| 11 Obiettivi operativi 2024-2026.....................................................................................................................  284 | 11 Obiettivi operativi 2024-2026.....................................................................................................................  284 |
| 11.1 | Obiettivi operativi ............................................................................................................................ 284 |
| 11.2 | Gli Obiettivi operativi e l'Agenda ONU 2030 per lo sviluppo sostenibile  ......................................... 477 |
| 11.3 | Obiettivi operativi: lettura per Linee di Mandato  ............................................................................ 486 |
| 11.4 | Obiettivi operativi: lettura per Missioni  ........................................................................................... 489 |
| 11.5 |  |
|  | Obiettivi operativi: lettura per Progetti strategici trasversali  .......................................................... 492 |
| 11.6 | Obiettivi operativi dell'agenda territoriale per lo sviluppo sostenibile e per la creazione di Valore  pubblico  500 |
| 11.7 | Obiettivi operativi per le giovani generazioni .................................................................................. 511 |
| Sezione operativa - Parte 2 .................................................................................................................................  518 | Sezione operativa - Parte 2 .................................................................................................................................  518 |
| 12 Programma triennale dei lavori pubblici 2024-2026  ..................................................................................  519 | 12 Programma triennale dei lavori pubblici 2024-2026  ..................................................................................  519 |
|  | Programma triennale degli acquisti di beni e servizi 2024-2026  ................................................................  529 |
| 14 Linee di indirizzo in materia di programmazione triennale del fabbisogno del personale relativamente al | 14 Linee di indirizzo in materia di programmazione triennale del fabbisogno del personale relativamente al |
| triennio 2024-2026 ..............................................................................................................................................  542 | triennio 2024-2026 ..............................................................................................................................................  542 |
| 16 Obiettivi specifici, annuali e pluriennali, sul complesso delle spese di funzionamento, ivi comprese quelle | 16 Obiettivi specifici, annuali e pluriennali, sul complesso delle spese di funzionamento, ivi comprese quelle |
| per il personale, delle società controllate, ex art. 19, co 5 del TUSP ...................................................................  551 | per il personale, delle società controllate, ex art. 19, co 5 del TUSP ...................................................................  551 |
| 16.1 | Finalità dell'atto ............................................................................................................................... 551 |
| 16.2 | Normativa di riferimento e individuazione delle voci di spesa rientranti nelle c.d. spese di |
| 16.3 | Metodologia di analisi  ...................................................................................................................... 552 |
| 16.3.1 | Spese generali ........................................................................................................................ 553 |
| 16.3.2 | Spese di personale  .................................................................................................................. 554 |
| 16.4 | Modalità di attribuzione degli obiettivi alle società a controllo pubblico da parte del Comune di |
| Bologna e degli indirizzi sul complesso delle spese di funzionamento ai sensi dell'art. 19, comma 5 del D.Lgs.  175/2016 (TUSP) ............................................................................................................................................ 554 | Bologna e degli indirizzi sul complesso delle spese di funzionamento ai sensi dell'art. 19, comma 5 del D.Lgs.  175/2016 (TUSP) ............................................................................................................................................ 554 |
| 16.5 Provvedimenti societari in recepimento degli obiettivi fissati dal socio Comune di Bologna ......... 555 | 16.5 Provvedimenti societari in recepimento degli obiettivi fissati dal socio Comune di Bologna ......... 555 |
| 16.5.1 | 16.5.1 |
|  | Budget di esercizio ................................................................................................................. 555 |
| 16.5.2 | Relazione sul governo societario ............................................................................................ 555 |
| 16.5.3 | Contratto aziendale integrativo ............................................................................................. 555 |
| 16.6 Le società a controllo pubblico del Comune di Bologna .................................................................. 556 | 16.6 Le società a controllo pubblico del Comune di Bologna .................................................................. 556 |
| 16.6.1 | Le società a controllo pubblico del Comune di  Bologna  ........................................................ 556 |
| 16.6.2 | Indirizzi comuni alle società a controllo pubblico .................................................................. 557 |
| 16.6.3 | Indirizzi relativi alle singole società a controllo pubblico ....................................................... 558 |
| 17 Programma relativo all'affidamento, per l'anno 2024, di incarichi e collaborazioni a persone fisiche da | 17 Programma relativo all'affidamento, per l'anno 2024, di incarichi e collaborazioni a persone fisiche da |
| parte dei Dipartimenti, Aree, Settori e Quartieri .................................................................................................  571 | parte dei Dipartimenti, Aree, Settori e Quartieri .................................................................................................  571 |
| A llegato  1 -  Programmi obiettivo approvati dai singoli quartieri per il triennio 2024-2026 .................................. | A llegato  1 -  Programmi obiettivo approvati dai singoli quartieri per il triennio 2024-2026 .................................. |
",
   "example": [
       {
           "input": "Jay Chou (Jay Chou), born on January 18, 1979, in Xinbei City, Taiwan Province, originally from Yongchun County, Fujian Province, is a Mandopop male singer, musician, actor, director, screenwriter, and a graduate of Tamkang Senior High School.
In 2000, recommended by Yang Junrong, Jay Chou started singing his own compositions.",
           "output": [
               {
                   "Section Summary": "Personal Introduction",
                   "Section Starting Point": "Jay Chou (Jay Chou), born on January 18"
               },
               {
                   "Section Summary": "Career Start",
                   "Section Starting Point": "
In 2000, recommended by Yang Junrong"
               }
           ]
       },
       {
           "input": "Hangzhou Flexible Employment Personnel Housing Provident Fund Management Measures (Trial)
To expand the benefits of the housing provident fund system and support flexible employment personnel to solve housing problems, according to the State Council's 'Housing Provident Fund Management Regulations', 'Zhejiang Province Housing Provident Fund Regulations' and the relevant provisions and requirements of the Ministry of Housing and Urban-Rural Development and the Zhejiang Provincial Department of Housing and Urban-Rural Development on flexible employment personnel participating in the housing provident fund system, combined with the actual situation in Hangzhou, this method is formulated.
1. This method applies to the voluntary deposit, use, and management of the housing provident fund for flexible employment personnel within the administrative region of this city.
2. The flexible employment personnel referred to in this method are those who are within the administrative region of this city, aged 16 and above, and males under 60 and females under 55, with full civil capacity, and employed in a flexible manner such as part-time, self-employed, or in new forms of employment.
3. Flexible employment personnel applying to deposit the housing provident fund should apply to the Hangzhou Housing Provident Fund Management Center (hereinafter referred to as the Provident Fund Center) for deposit registration procedures and set up personal accounts.",
           "output": [
               {
                   "Section Summary": "Background and Basis for Formulating the Management Measures",
                   "Section Starting Point": "To expand the benefits of the housing provident fund system"
               },
               {
                   "Section Summary": "Scope of Application of the Management Measures",
                   "Section Starting Point": "1. This method applies to the voluntary deposit"
               },
               {
                   "Section Summary": "Definition of Flexible Employment Personnel",
                   "Section Starting Point": "2. The flexible employment personnel referred to in this method"
               },
               {
                   "Section Summary": "Procedures for Flexible Employment Personnel to Register for Deposit",
                   "Section Starting Point": "3. Flexible employment personnel applying to deposit the housing provident fund"
               }
           ]
       }
   ]
}    
   
llm output: 

   at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:48)
   at /openspg_venv/lib/python3.8/site-packages/kag/interface/builder/base.invoke(base.py:114)
   at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter._invoke(semantic_splitter.py:157)
   at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter.semantic_chunk(semantic_splitter.py:119)
   at /openspg_venv/lib/python3.8/site-packages/kag/interface/common/llm_client.invoke(llm_client.py:117)
   at pemja.core.PythonInterpreter.invokeMethod(Native Method)
   at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
   at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.splitterChunk(KagSplitterAsyncTask.java:217)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:179)
   at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:142)
   at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.executeTask(MemoryTaskServer.java:67)
   at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.lambda$submit$0(MemoryTaskServer.java:56)
   at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:750)

2025-03-05 11:22:51(172.24.0.5): Splitter task status is ERROR
2025-03-05 11:22:51(172.24.0.5): The asynchronous task has been created! resource:builder/project_2/instance_10/56_kagSplitterAsyncTask.kag
2025-03-05 11:22:51(172.24.0.5): Lock preempted successfully!

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@DrProNoob
Copy link

DrProNoob commented Mar 5, 2025

Hey @epie-godfred,

Do you provide a llm to the semantic splitter in your config.yaml? You need to provide a llm:

splitter:
type: semantic_splitter
llm: *chat_llm

@epie-godfred
Copy link
Author

epie-godfred commented Mar 5, 2025

Hey @DrProNoob

I was using the UI and it seems there is no way of adding this particular configuration from the UI.
I created a new knowledge Base project by running :

$ knext project create --config_path example_config_comune.yaml 

after updating the example_config.yaml provided here into example_config_comune.yaml as follows

#------------project configuration start----------------#
openie_llm: &openie_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

chat_llm: &chat_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

vectorize_model: &vectorize_model
  api_key: <openai_api_key>
  base_url: https://api.openai.com/v1
  model: text-embedding-3-small
  type: openai
  vector_dimensions: 1024
vectorizer: *vectorize_model

log:
  level: INFO

project:
  biz_scene: default
  host_addr: http://127.0.0.1:8887
  id: "1"
  language: en
  namespace: KAGBologna
#------------project configuration end----------------#

#------------kag-builder configuration start----------------#
kag_builder_pipeline:
  chain:
    type: unstructured_builder_chain # kag.builder.default_chain.DefaultUnstructuredBuilderChain
    extractor:
      type: schema_free_extractor # kag.builder.component.extractor.schema_free_extractor.SchemaFreeExtractor
      llm: *openie_llm
      ner_prompt:
        type: default_ner # kag.builder.prompt.default.ner.OpenIENERPrompt
      std_prompt:
        type: default_std # kag.builder.prompt.default.std.OpenIEEntitystandardizationdPrompt
      triple_prompt:
        type: default_triple # kag.builder.prompt.default.triple.OpenIETriplePrompt
    reader:
      type: dict_reader # kag.builder.component.reader.dict_reader.DictReader
    post_processor:
      type: kag_post_processor # kag.builder.component.postprocessor.kag_postprocessor.KAGPostProcessor
    splitter:
      type: semantic_splitter #length_splitter # kag.builder.component.splitter.length_splitter.LengthSplitter
      llm: *chat_llm
      split_length: 100000
      window_length: 0
    vectorizer:
      type: batch_vectorizer # kag.builder.component.vectorizer.batch_vectorizer.BatchVectorizer
      vectorize_model: *vectorize_model
    writer:
      type: kg_writer # kag.builder.component.writer.kg_writer.KGWriter
  num_threads_per_chain: 1
  num_chains: 16
  scanner:
    type: 2wiki_dataset_scanner # kag.builder.component.scanner.dataset_scanner.MusiqueCorpusScanner
#------------kag-builder configuration end----------------#

#------------kag-solver configuration start----------------#
search_api: &search_api
  type: openspg_search_api #kag.solver.tools.search_api.impl.openspg_search_api.OpenSPGSearchAPI

graph_api: &graph_api
  type: openspg_graph_api #kag.solver.tools.graph_api.impl.openspg_graph_api.OpenSPGGraphApi

exact_kg_retriever: &exact_kg_retriever
  type: default_exact_kg_retriever # kag.solver.retriever.impl.default_exact_kg_retriever.DefaultExactKgRetriever
  el_num: 5
  llm_client: *chat_llm
  search_api: *search_api
  graph_api: *graph_api

fuzzy_kg_retriever: &fuzzy_kg_retriever
  type: default_fuzzy_kg_retriever # kag.solver.retriever.impl.default_fuzzy_kg_retriever.DefaultFuzzyKgRetriever
  el_num: 5
  vectorize_model: *vectorize_model
  llm_client: *chat_llm
  search_api: *search_api
  graph_api: *graph_api

chunk_retriever: &chunk_retriever
  type: default_chunk_retriever # kag.solver.retriever.impl.default_fuzzy_kg_retriever.DefaultFuzzyKgRetriever
  llm_client: *chat_llm
  recall_num: 10
  rerank_topk: 10

kag_solver_pipeline:
  memory:
    type: default_memory # kag.solver.implementation.default_memory.DefaultMemory
    llm_client: *chat_llm
  max_iterations: 3
  reasoner:
    type: default_reasoner # kag.solver.implementation.default_reasoner.DefaultReasoner
    llm_client: *chat_llm
    lf_planner:
      type: default_lf_planner # kag.solver.plan.default_lf_planner.DefaultLFPlanner
      llm_client: *chat_llm
      vectorize_model: *vectorize_model
    lf_executor:
      type: default_lf_executor # kag.solver.execute.default_lf_executor.DefaultLFExecutor
      llm_client: *chat_llm
      force_chunk_retriever: true
      exact_kg_retriever: *exact_kg_retriever
      fuzzy_kg_retriever: *fuzzy_kg_retriever
      chunk_retriever: *chunk_retriever
      merger:
        type: default_lf_sub_query_res_merger # kag.solver.execute.default_sub_query_merger.DefaultLFSubQueryResMerger
        vectorize_model: *vectorize_model
        chunk_retriever: *chunk_retriever
  generator:
    type: default_generator # kag.solver.implementation.default_generator.DefaultGenerator
    llm_client: *chat_llm
    generate_prompt:
      type: default_resp_generator # kag.solver.prompt.default.resp_generator.RespGenerator
  reflector:
    type: default_reflector # kag.solver.implementation.default_reflector.DefaultReflector
    llm_client: *chat_llm

#------------kag-solver configuration end----------------#

I changed the splitter config from

 splitter:
      type: length_splitter # kag.builder.component.splitter.length_splitter.LengthSplitter
      split_length: 100000
      window_length: 0

to

 splitter:
      type: semantic_splitter #length_splitter # kag.builder.component.splitter.length_splitter.LengthSplitter
      llm: *chat_llm
      split_length: 100000
      window_length: 0

still getting the same error :

2025-03-05 15:25:49(172.24.0.5): Task scheduling completed. cost:11 ms !
2025-03-05 15:25:49(172.24.0.5): Lock released successfully!
2025-03-05 15:25:49(172.24.0.5): Splitter task trace log:
pemja.core.PythonException: <class 'RuntimeError'>: LLM invoke exception, info: Expecting value: line 1 column 1 (char 0)
llm input: 

{
    "instruction": "
Please understand the content of the text in the input field, recognize the structure and components of the text, and determine the segmentation points according to the semantic theme, dividing it into several non-overlapping sections. If the article has recognizable structural information such as chapters, please divide it according to the top-level structure.
Please return the results according to the schema definition, including summaries and starting points of the sections. The format must be a JSON string. Please follow the examples given in the example field.",
    "schema": {
        "Section Summary": "A brief summary of the section text",
        "Section Starting Point": "The starting point of the section in the original text, limited to about 20 characters. This segmentation point will be used to split the original text, so it must be found in the original text!"
    },
    "input": "",
    "example": [
        {
            "input": "Jay Chou (Jay Chou), born on January 18, 1979, in Xinbei City, Taiwan Province, originally from Yongchun County, Fujian Province, is a Mandopop male singer, musician, actor, director, screenwriter, and a graduate of Tamkang Senior High School.
In 2000, recommended by Yang Junrong, Jay Chou started singing his own compositions.",
            "output": [
                {
                    "Section Summary": "Personal Introduction",
                    "Section Starting Point": "Jay Chou (Jay Chou), born on January 18"
                },
                {
                    "Section Summary": "Career Start",
                    "Section Starting Point": "
In 2000, recommended by Yang Junrong"
                }
            ]
        },
        {
            "input": "Hangzhou Flexible Employment Personnel Housing Provident Fund Management Measures (Trial)
To expand the benefits of the housing provident fund system and support flexible employment personnel to solve housing problems, according to the State Council's 'Housing Provident Fund Management Regulations', 'Zhejiang Province Housing Provident Fund Regulations' and the relevant provisions and requirements of the Ministry of Housing and Urban-Rural Development and the Zhejiang Provincial Department of Housing and Urban-Rural Development on flexible employment personnel participating in the housing provident fund system, combined with the actual situation in Hangzhou, this method is formulated.
1. This method applies to the voluntary deposit, use, and management of the housing provident fund for flexible employment personnel within the administrative region of this city.
2. The flexible employment personnel referred to in this method are those who are within the administrative region of this city, aged 16 and above, and males under 60 and females under 55, with full civil capacity, and employed in a flexible manner such as part-time, self-employed, or in new forms of employment.
3. Flexible employment personnel applying to deposit the housing provident fund should apply to the Hangzhou Housing Provident Fund Management Center (hereinafter referred to as the Provident Fund Center) for deposit registration procedures and set up personal accounts.",
            "output": [
                {
                    "Section Summary": "Background and Basis for Formulating the Management Measures",
                    "Section Starting Point": "To expand the benefits of the housing provident fund system"
                },
                {
                    "Section Summary": "Scope of Application of the Management Measures",
                    "Section Starting Point": "1. This method applies to the voluntary deposit"
                },
                {
                    "Section Summary": "Definition of Flexible Employment Personnel",
                    "Section Starting Point": "2. The flexible employment personnel referred to in this method"
                },
                {
                    "Section Summary": "Procedures for Flexible Employment Personnel to Register for Deposit",
                    "Section Starting Point": "3. Flexible employment personnel applying to deposit the housing provident fund"
                }
            ]
        }
    ]
}    
    
llm output: 

	at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:48)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/builder/base.invoke(base.py:114)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter._invoke(semantic_splitter.py:157)
	at /openspg_venv/lib/python3.8/site-packages/kag/builder/component/splitter/semantic_splitter.semantic_chunk(semantic_splitter.py:119)
	at /openspg_venv/lib/python3.8/site-packages/kag/interface/common/llm_client.invoke(llm_client.py:117)
	at pemja.core.PythonInterpreter.invokeMethod(Native Method)
	at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
	at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.splitterChunk(KagSplitterAsyncTask.java:217)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:179)
	at com.antgroup.openspg.server.core.scheduler.service.task.async.builder.KagSplitterAsyncTask$SplitterTaskCallable.call(KagSplitterAsyncTask.java:142)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.executeTask(MemoryTaskServer.java:67)
	at com.antgroup.openspg.server.core.scheduler.service.common.MemoryTaskServer.lambda$submit$0(MemoryTaskServer.java:56)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

2025-03-05 15:25:49(172.24.0.5): Splitter task status is ERROR
2025-03-05 15:25:49(172.24.0.5): The asynchronous task has been created! resource:builder/project_4/instance_13/74_kagSplitterAsyncTask.kag
2025-03-05 15:25:49(172.24.0.5): Lock preempted successfully!

2025-03-05 15:24:49(172.24.0.5): Task scheduling completed. cost:9 ms !
2025-03-05 15:24:49(172.24.0.5): Lock released successfully!
2025-03-05 15:24:49(172.24.0.5): Splitter task trace log:
    >> 15:24:32: Split chunk(Sommario)
    >> 15:24:32: Split chunk(Documento Unico di Programmazione 2024-2026) successfully. chunk size:2
    >> 15:24:28: Split chunk(Documento Unico di Programmazione 2024-2026)
    >> 15:24:28: Invoke the split operator
    >> 15:24:28: Start split document!

2025-03-05 15:24:49(172.24.0.5): Splitter task status is RUNNING
2025-03-05 15:24:49(172.24.0.5): The asynchronous task has been created! resource:builder/project_4/instance_13/74_kagSplitterAsyncTask.kag
2025-03-05 15:24:49(172.24.0.5): Lock preempted successfully!

@DrProNoob
Copy link

DrProNoob commented Mar 5, 2025

Hey @epie-godfred,

could you change the log to debug and share the output.

log:
  level: DEBUG

@epie-godfred
Copy link
Author

During the Create Task I tried to Preview Extract Effect and got the following error :

Done initialize project config with host addr http://127.0.0.1:8887 and project_id 1
Done init config from server: set KAG_DEBUG_DUMP_CONFIG=1 to dump config
2025-03-06 16:51:32,264 [] [] [http-nio-8887-exec-8] ERROR c.a.o.s.a.h.s.HttpBizTemplate - execute http biz callback unknown error
pemja.core.PythonException: <class 'pyhocon.exceptions.ConfigMissingException'>: No configuration setting found for key llm
        at /openspg_venv/lib/python3.8/site-packages/kag/bridge/spg_server_bridge.run_component(spg_server_bridge.py:45)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.from_config(registrable.py:813)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.from_config(registrable.py:763)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.from_config(registrable.py:813)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.from_config(registrable.py:791)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.create_kwargs(registrable.py:249)
        at /openspg_venv/lib/python3.8/site-packages/kag/common/registry/registrable.pop_and_construct_arg(registrable.py:281)
        at /openspg_venv/lib/python3.8/site-packages/pyhocon/config_tree.pop(config_tree.py:274)
        at /openspg_venv/lib/python3.8/site-packages/pyhocon/config_tree.get(config_tree.py:236)
        at /openspg_venv/lib/python3.8/site-packages/pyhocon/config_tree._get(config_tree.py:176)
        at pemja.core.PythonInterpreter.invokeMethod(Native Method)
        at pemja.core.PythonInterpreter.invokeMethod(PythonInterpreter.java:118)
        at com.antgroup.openspg.common.util.pemja.PemjaUtils.invoke(PemjaUtils.java:33)
        at com.antgroup.openspgapp.api.http.server.builder.BuilderJobController.paragraphSplit(BuilderJobController.java:731)
        at com.antgroup.openspgapp.api.http.server.builder.BuilderJobController$12.action(BuilderJobController.java:708)
        at com.antgroup.openspgapp.api.http.server.builder.BuilderJobController$12.action(BuilderJobController.java:676)
        at com.antgroup.openspg.server.api.http.server.HttpBizTemplate.execute2(HttpBizTemplate.java:78)
        at com.antgroup.openspgapp.api.http.server.builder.BuilderJobController.splitPreview(BuilderJobController.java:675)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.antgroup.openspgapp.api.http.server.filter.AclFilter.doFilter(AclFilter.java:137)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at com.alipay.sofa.tracer.plugins.springmvc.SpringMvcSofaTracerFilter.doFilter(SpringMvcSofaTracerFilter.java:87)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:750)

Image

the project configuration file is the same as yerterday :

#------------project configuration start----------------#
openie_llm: &openie_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

chat_llm: &chat_llm
  api_key: <openrouter_api_key>
  base_url: https://openrouter.ai/api/v1
  model: deepseek/deepseek-chat
  type: maas

vectorize_model: &vectorize_model
  api_key: <openai_api_key>
  base_url: https://api.openai.com/v1
  model: text-embedding-3-small
  type: openai
  vector_dimensions: 1024
vectorizer: *vectorize_model

log:
  level: DEBUG

project:
  biz_scene: default
  host_addr: http://127.0.0.1:8887
  id: "1"
  language: en
  namespace: KAGBologna1
#------------project configuration end----------------#

#------------kag-builder configuration start----------------#
kag_builder_pipeline:
  chain:
    type: unstructured_builder_chain # kag.builder.default_chain.DefaultUnstructuredBuilderChain
    extractor:
      type: schema_free_extractor # kag.builder.component.extractor.schema_free_extractor.SchemaFreeExtractor
      llm: *openie_llm
      ner_prompt:
        type: default_ner # kag.builder.prompt.default.ner.OpenIENERPrompt
      std_prompt:
        type: default_std # kag.builder.prompt.default.std.OpenIEEntitystandardizationdPrompt
      triple_prompt:
        type: default_triple # kag.builder.prompt.default.triple.OpenIETriplePrompt
    reader:
      type: dict_reader # kag.builder.component.reader.dict_reader.DictReader
    post_processor:
      type: kag_post_processor # kag.builder.component.postprocessor.kag_postprocessor.KAGPostProcessor
    splitter:
      type: semantic_splitter #length_splitter # kag.builder.component.splitter.length_splitter.LengthSplitter
      llm: *chat_llm
      split_length: 100000
      window_length: 0
    vectorizer:
      type: batch_vectorizer # kag.builder.component.vectorizer.batch_vectorizer.BatchVectorizer
      vectorize_model: *vectorize_model
    writer:
      type: kg_writer # kag.builder.component.writer.kg_writer.KGWriter
  num_threads_per_chain: 1
  num_chains: 16
  scanner:
    type: 2wiki_dataset_scanner # kag.builder.component.scanner.dataset_scanner.MusiqueCorpusScanner
#------------kag-builder configuration end----------------#

#------------kag-solver configuration start----------------#
search_api: &search_api
  type: openspg_search_api #kag.solver.tools.search_api.impl.openspg_search_api.OpenSPGSearchAPI

graph_api: &graph_api
  type: openspg_graph_api #kag.solver.tools.graph_api.impl.openspg_graph_api.OpenSPGGraphApi

exact_kg_retriever: &exact_kg_retriever
  type: default_exact_kg_retriever # kag.solver.retriever.impl.default_exact_kg_retriever.DefaultExactKgRetriever
  el_num: 5
  llm_client: *chat_llm
  search_api: *search_api
  graph_api: *graph_api

fuzzy_kg_retriever: &fuzzy_kg_retriever
  type: default_fuzzy_kg_retriever # kag.solver.retriever.impl.default_fuzzy_kg_retriever.DefaultFuzzyKgRetriever
  el_num: 5
  vectorize_model: *vectorize_model
  llm_client: *chat_llm
  search_api: *search_api
  graph_api: *graph_api

chunk_retriever: &chunk_retriever
  type: default_chunk_retriever # kag.solver.retriever.impl.default_fuzzy_kg_retriever.DefaultFuzzyKgRetriever
  llm_client: *chat_llm
  recall_num: 10
  rerank_topk: 10

kag_solver_pipeline:
  memory:
    type: default_memory # kag.solver.implementation.default_memory.DefaultMemory
    llm_client: *chat_llm
  max_iterations: 3
  reasoner:
    type: default_reasoner # kag.solver.implementation.default_reasoner.DefaultReasoner
    llm_client: *chat_llm
    lf_planner:
      type: default_lf_planner # kag.solver.plan.default_lf_planner.DefaultLFPlanner
      llm_client: *chat_llm
      vectorize_model: *vectorize_model
    lf_executor:
      type: default_lf_executor # kag.solver.execute.default_lf_executor.DefaultLFExecutor
      llm_client: *chat_llm
      force_chunk_retriever: true
      exact_kg_retriever: *exact_kg_retriever
      fuzzy_kg_retriever: *fuzzy_kg_retriever
      chunk_retriever: *chunk_retriever
      merger:
        type: default_lf_sub_query_res_merger # kag.solver.execute.default_sub_query_merger.DefaultLFSubQueryResMerger
        vectorize_model: *vectorize_model
        chunk_retriever: *chunk_retriever
  generator:
    type: default_generator # kag.solver.implementation.default_generator.DefaultGenerator
    llm_client: *chat_llm
    generate_prompt:
      type: default_resp_generator # kag.solver.prompt.default.resp_generator.RespGenerator
  reflector:
    type: default_reflector # kag.solver.implementation.default_reflector.DefaultReflector
    llm_client: *chat_llm

#------------kag-solver configuration end----------------#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants