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

[Issue]: <title> In the graphrag prompt-tune --config ./settings.yaml --root ./ --language Chinese --output ./prompts After the error is reported, there is no error in 0.5.0 #1641

Open
3 tasks done
MoonS11 opened this issue Jan 20, 2025 · 0 comments
Labels
triage Default label assignment, indicates new issue needs reviewed by a maintainer

Comments

@MoonS11
Copy link

MoonS11 commented Jan 20, 2025

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
  • I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the issue

kong.txt

I'm running graphrag prompt-tune --config ./settings.yaml --root ./ --language Chinese --output ./prompts on the command line
I ran into an error, but I did the prompt optimization in version 0.5.0 very smoothly

Here's an error message:

Key Elements:

  1. Cultivation System: The text heavily emphasizes the cultivation of 斗之气 (Dou Qi), a common trope in martial arts or cultivation fantasy genres. The protagonist's struggle to regain his lost power is central to the n
    arrative.
  2. Character Development: The protagonist, 萧炎 (Xiao Yan), is depicted as a fallen genius, dealing with societal judgment and personal setbacks. His journey is one of resilience and determination.
  3. World-Building: The story is set in a hierarchical society where strength and talent determine one's status. The 斗气大陆 (Dou Qi Continent) is a world where power and cultivation are paramount.
  4. Conflict and Redemption: The narrative focuses on the protagonist's internal and external conflicts, including societal pressure, family expectations, and his own self-doubt.

Domain:

Fantasy Fiction (Cultivation/Martial Arts Fantasy)
This domain encapsulates the themes of cultivation, martial arts, and personal growth within a fantastical setting. The text fits well within this genre, as it explores the protagonist's journey to reclaim his lost power and sta
tus in a world where strength and talent are highly valued.

INFO: Generating persona...

INFO: Generating community report ranking description...

INFO: Generating entity types...

│ │
│ F:\AWorks\work_python\ragkb.venv\lib\site-packages\fnllm\base\base.py:112 in call
│ │
│ 109 │ ) -> LLMOutput[TOutput, TJsonModel, THistoryEntry]: │
│ 110 │ │ """Invoke the LLM.""" │
│ 111 │ │ try: │
│ ❱ 112 │ │ │ return await self._invoke(prompt, **kwargs) │
│ 113 │ │ except BaseException as e: │
│ 114 │ │ │ stack_trace = traceback.format_exc() │
│ 115 │ │ │ if self._events: │
│ │
│ ╭─────────────────────────────────────────────────────────────────────── locals ────────────────────────────────────────────────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'history': [ │ │
│ │ │ │ {'role': 'system', 'content': 'You are an expert **Fantasy Fiction Analyst specializing in Cultivation and Mart'+417} │ │
│ │ │ ], │ │
│ │ │ 'json_model': <class 'graphrag.prompt_tune.generator.entity_types.EntityTypesResponse'> │ │
│ │ } │ │
│ │ prompt = '\nThe goal is to study the connections and relations between the entity types and'+8731 │ │
│ │ self = <fnllm.openai.llm.chat_text.OpenAITextChatLLMImpl object at 0x00000150F045A680> │ │
│ │ stack_trace = 'Traceback (most recent call last):\n File "F:\AWorks\work_python\ragkb\.venv\lib'+19294 │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ F:\AWorks\work_python\ragkb.venv\lib\site-packages\fnllm\base\base.py:128 in _invoke │
│ │
│ 125 │ ) -> LLMOutput[TOutput, TJsonModel, THistoryEntry]: │
│ 126 │ │ """Run the LLM invocation, returning an LLMOutput.""" │
│ 127 │ │ prompt, kwargs = self._rewrite_input(prompt, kwargs) │
│ ❱ 128 │ │ return await self._decorated_target(prompt, **kwargs) │
│ 129 │ │
│ 130 │ def _rewrite_input( │
│ 131 │ │ self, │
│ │
│ ╭───────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'history': [ │ │
│ │ │ │ {'role': 'system', 'content': 'You are an expert **Fantasy Fiction Analyst specializing in Cultivation and Mart'+417} │ │
│ │ │ ], │ │
│ │ │ 'json_model': <class 'graphrag.prompt_tune.generator.entity_types.EntityTypesResponse'> │ │
│ │ } │ │
│ │ prompt = '\nThe goal is to study the connections and relations between the entity types and'+8731 │ │
│ │ self = <fnllm.openai.llm.chat_text.OpenAITextChatLLMImpl object at 0x00000150F045A680> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ F:\AWorks\work_python\ragkb.venv\lib\site-packages\fnllm\services\json.py:70 in invoke │
│ │
│ 67 │ │ │ **kwargs: Unpack[LLMInput[TJsonModel, THistoryEntry, TModelParameters]], │
│ 68 │ │ ) -> LLMOutput[TOutput, TJsonModel, THistoryEntry]: │
│ 69 │ │ │ if kwargs.get("json_model") is not None or kwargs.get("json"): │
│ ❱ 70 │ │ │ │ return await this.invoke_json(delegate, prompt, kwargs) │
│ 71 │ │ │ return await delegate(prompt, **kwargs) │
│ 72 │ │ │
│ 73 │ │ return invoke │
│ │
│ ╭───────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'history': [ │ │
│ │ │ │ {'role': 'system', 'content': 'You are an expert **Fantasy Fiction Analyst specializing in Cultivation and Mart'+417} │ │
│ │ │ ], │ │
│ │ │ 'json_model': <class 'graphrag.prompt_tune.generator.entity_types.EntityTypesResponse'>, │ │
│ │ │ 'name': '-(retry 3)' │ │
│ │ } │ │
│ │ prompt = '\nThe goal is to study the connections and relations between the entity types and'+8731 │ │
│ │ this = <fnllm.services.json.JsonReceiver object at 0x00000150F045A4D0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ F:\AWorks\work_python\ragkb.venv\lib\site-packages\fnllm\services\json.py:166 in invoke_json │
│ │
│ 163 │ │ │ except FailedToGenerateValidJsonError as e: │
│ 164 │ │ │ │ error = e │
│ 165 │ │ │
│ ❱ 166 │ │ raise FailedToGenerateValidJsonError from error │
│ 167 │ │
│ 168 │ async def try_receive_json( │
│ 169 │ │ self, │
│ │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ attempt = 3 │ │
│ │ error = FailedToGenerateValidJsonError('JSON response is not a valid JSON, response={"entities": ["cultivation system", "character", "world", "societal hierarchy", "conflict", "redemption", "family", "power system", │ │
│ │ "society", "individual", "cultivation level", "family hierarchy", "personal struggle", "societal judgment", "cultivation talent", "soul strength", "cultivation speed", "family expectations", "internal │ │
│ │ conflict", "external conflict", "cultivation setback", "cultivation potential", "cultivation rank", "cultivation technique", "cultivation milestone", "cultivation achievement", "cultivation society", │ │
│ │ "cultivation status", "cultivation ambition", "cultivation determination", "cultivation resilience", "cultivation talent loss", "cultivation talent recovery", "cultivation talent recognition", "cultivation │ │
│ │ talent comparison", "cultivation talent hierarchy", "cultivation talent evaluation", "cultivation talent development", "cultivation talent assessment", "cultivation talent potential", "cultivation talent │ │
│ │ realization", "cultivation talent competition", "cultivation talent recognition", "cultivation talent acknowledgment", "cultivation talent admiration", "cultivation talent envy", "cultivation talent rivalry", │ │
│ │ "cultivation talent challenge", "cultivation talent perseverance", "cultivation talent ambition", "cultivation talent motivation", "cultivation talent aspiration", "cultivation talent goal", "cultivation talent │ │
│ │ objective", "cultivation talent pursuit", "cultivation talent journey", "cultivation talent path", "cultivation talent destiny", "cultivation talent fate", "cultivation talent legacy", "cultivation talent │ │
│ │ heritage", "cultivation talent inheritance", "cultivation talent lineage", "cultivation talent ancestry", "cultivation talent genealogy", "cultivation talent descent", "cultivation talent origin", "cultivation │ │
│ │ talent source", "cultivation talent foundation", "cultivation talent base", "cultivation talent root", "cultivation talent core", "cultivation talent essence", "cultivation talent spirit", "cultivation talent │ │
│ │ soul", "cultivation talent heart", "cultivation talent mind", "cultivation talent body", "cultivation talent physique", "cultivation talent constitution", "cultivation talent stamina", "cultivation talent │ │
│ │ endurance", "cultivation talent vitality", "cultivation talent energy", "cultivation talent power", "cultivation talent force", "cultivation talent strength", "cultivation talent might", "cultivation talent │ │
│ │ potency", "cultivation talent intensity", "cultivation talent vigor", "cultivation talent robustness", "cultivation talent hardiness", "cultivation talent toughness", "cultivation talent resilience", │ │
│ │ "cultivation talent flexibility", "cultivation talent adaptability", "cultivation talent versatility", "cultivation talent diversity", "cultivation talent variety", "cultivation talent multiplicity", │ │
│ │ "cultivation talent complexity", "cultivation talent intricacy", "cultivation talent sophistication", "cultivation talent refinement", "cultivation talent elegance", "cultivation talent grace", "cultivation │ │
│ │ talent beauty", "cultivation talent charm", "cultivation talent allure", "cultivation talent magnetism", "cultivation talent attraction", "cultivation talent appeal", "cultivation talent fascination", │ │
│ │ "cultivation talent enchantment", "cultivation talent captivation", "cultivation talent enthrallment", "cultivation talent bewitchment", "cultivation talent spellbinding", "cultivation talent mesmerizing", │ │
│ │ "cultivation talent hypnotic", "cultivation talent entrancing", "cultivation talent captivating", "cultivation talent engaging", "cultivation talent absorbing", "cultivation talent engrossing", "cultivation │ │
│ │ talent riveting", "cultivation talent gripping", "cultivation talent compelling", "cultivation talent persuasive", "cultivation talent convincing", "cultivation talent influential", "cultivation talent │ │
│ │ impactful", "cultivation talent significant", "cultivation talent meaningful", "cultivation talent profound", "cultivation talent deep", "cultivation talent intense", "cultivation talent passionate", │ │
│ │ "cultivation talent fervent", "cultivation talent ardent", "cultivation talent zealous", "cultivation talent enthusiastic", "cultivation talent eager", "cultivation talent keen", "cultivation talent avid", │ │
│ │ "cultivation talent devoted", "cultivation talent dedicated", "cultivation talent committed", "cultivation talent loyal", "cultivation talent faithful", "cultivation talent steadfast", "cultivation talent │ │
│ │ resolute", "cultivation talent determined", "cultivation talent persistent", "cultivation talent tenacious", "cultivation talent dogged", "cultivation talent unyielding", "cultivation talent unrelenting", │ │
│ │ "cultivation talent relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation │ │
│ │ undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation │ │
│ │ tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation │ │
│ │ unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation │ │
│ │ resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation │ │
│ │ tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", │ │
│ │ "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", │ │
│ │ "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation │ │
│ │ unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation │ │
│ │ determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation │ │
│ │ indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", │ │
│ │ "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", │ │
│ │ "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation │ │
│ │ unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation │ │
│ │ persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation │ │
│ │ inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", │ │
│ │ "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", │ │
│ │ "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation │ │
│ │ undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation │ │
│ │ tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation │ │
│ │ unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation │ │
│ │ resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation │ │
│ │ tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", │ │
│ │ "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", │ │
│ │ "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation │ │
│ │ unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation │ │
│ │ determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation │ │
│ │ indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", │ │
│ │ "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", │ │
│ │ "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation │ │
│ │ unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation │ │
│ │ persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation │ │
│ │ inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", │ │
│ │ "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", │ │
│ │ "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation │ │
│ │ undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation │ │
│ │ tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation │ │
│ │ unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation │ │
│ │ resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation │ │
│ │ tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", │ │
│ │ "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", │ │
│ │ "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation │ │
│ │ unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation │ │
│ │ determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation │ │
│ │ indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", │ │
│ │ "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", │ │
│ │ "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation │ │
│ │ unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation │ │
│ │ persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation │ │
│ │ inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", │ │
│ │ "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", │ │
│ │ "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation │ │
│ │ undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation │ │
│ │ tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation │ │
│ │ unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation │ │
│ │ resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation │ │
│ │ tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", │ │
│ │ "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", │ │
│ │ "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation │ │
│ │ unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation unshakable", "cultivation immovable", "cultivation steadfast", "cultivation resolute", "cultivation │ │
│ │ determined", "cultivation persistent", "cultivation tenacious", "cultivation dogged", "cultivation unyielding", "cultivation unrelenting", "cultivation relentless", "cultivation tireless", "cultivation │ │
│ │ indefatigable", "cultivation inexhaustible", "cultivation unflagging", "cultivation unwavering", "cultivation unswerving", "cultivation undeviating", "cultivation unflinching", "cultivation.') │ │
│ │ kwargs = { │ │
│ │ │ 'history': [{'role': 'system', 'content': 'You are an expert **Fantasy Fiction Analyst specializing in Cultivation and Mart'+417}], │ │
│ │ │ 'json_model': <class 'graphrag.prompt_tune.generator.entity_types.EntityTypesResponse'>, │ │
│ │ │ 'name': '-(retry 3)' │ │
│ │ } │ │
│ │ name = '' │ │
│ │ prompt = '\nThe goal is to study the connections and relations between the entity types and'+8731 │ │
│ │ self = <fnllm.services.json.JsonReceiver object at 0x00000150F045A4D0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FailedToGenerateValidJsonError

Steps to reproduce

No response

GraphRAG Config Used

encoding_model: cl100k_base
skip_workflows: []
llm:
  api_key: xxxx
  type: openai_chat # or azure_openai_chat
  model: deepseek-chat
  model_supports_json: true # recommended if this is available for your model.
  # audience: "https://cognitiveservices.azure.com/.default"
  # max_tokens: 4000
  # request_timeout: 180.0
  api_base: https://api.deepseek.com/v1
  # api_version: 2024-02-15-preview
  # organization: <organization_id>
  # deployment_name: <azure_model_deployment_name>
  # tokens_per_minute: 150_000 # set a leaky bucket throttle
  # requests_per_minute: 10_000 # set a leaky bucket throttle
  # max_retries: 10
  # max_retry_wait: 10.0
  # sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
  # concurrent_requests: 25 # the number of parallel inflight requests that may be made
  # temperature: 0 # temperature for sampling
  # top_p: 1 # top-p sampling
  # n: 1 # Number of completions to generate

parallelization:
  stagger: 0.3
  # num_threads: 50 # the number of threads to use for parallel processing

async_mode: threaded # or asyncio

embeddings:
  ## parallelization: override the global parallelization settings for embeddings
  async_mode: threaded # or asyncio
  # target: required # or all
  # batch_size: 16 # the number of documents to send in a single request
  # batch_max_tokens: 8191 # the maximum number of tokens to send in a single request
  vector_store:
    type: lancedb
    db_uri: 'output/lancedb'
    container_name: default # A prefix for the vector store to create embedding containers. Default: 'default'.
    overwrite: true
  # vector_store: # configuration for AI Search
    # type: azure_ai_search
    # url: <ai_search_endpoint>
    # api_key: <api_key> # if not set, will attempt to use managed identity. Expects the `Search Index Data Contributor` RBAC role in this case.
    # audience: <optional> # if using managed identity, the audience to use for the token
    # overwrite: true # or false. Only applicable at index creation time
    # container_name: default # A prefix for the AzureAISearch to create indexes. Default: 'default'.
  llm:
    api_key: xxxx
    type: openai_embedding # or azure_openai_embedding
    model: bge-m3
    api_base: http://192.168.1.1:9999
    # api_version: 2024-02-15-preview
    # audience: "https://cognitiveservices.azure.com/.default"
    # organization: <organization_id>
    # deployment_name: <azure_model_deployment_name>
    # tokens_per_minute: 150_000 # set a leaky bucket throttle
    # requests_per_minute: 10_000 # set a leaky bucket throttle
    # max_retries: 10
    # max_retry_wait: 10.0
    # sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
    # concurrent_requests: 25 # the number of parallel inflight requests that may be made

chunks:
  size: 1200
  overlap: 100
  group_by_columns: [id] # by default, we don't allow chunks to cross documents

input:
  type: file # or blob
  file_type: text # or csv
  base_dir: "input"
  file_encoding: utf-8
  file_pattern: ".*\\.txt$"

cache:
  type: file # or blob
  base_dir: "cache"
  # connection_string: <azure_blob_storage_connection_string>
  # container_name: <azure_blob_storage_container_name>

storage:
  type: file # or blob
  base_dir: "output"
  # connection_string: <azure_blob_storage_connection_string>
  # container_name: <azure_blob_storage_container_name>

update_index_storage: # Storage to save an updated index (for incremental indexing). Enabling this performs an incremental index run
  #type: file # or blob
  #base_dir: "update_output"
  # connection_string: <azure_blob_storage_connection_string>
  # container_name: <azure_blob_storage_container_name>

reporting:
  type: file # or console, blob
  base_dir: "logs"
  # connection_string: <azure_blob_storage_connection_string>
  # container_name: <azure_blob_storage_container_name>

entity_extraction:
  ## strategy: fully override the entity extraction strategy.
  ##   type: one of graph_intelligence, graph_intelligence_json and nltk
  ## llm: override the global llm settings for this task
  ## parallelization: override the global parallelization settings for this task
  ## async_mode: override the global async_mode settings for this task
  prompt: "prompts/entity_extraction.txt"
  entity_types: [organization,person,geo,event]
  max_gleanings: 1

summarize_descriptions:
  ## llm: override the global llm settings for this task
  ## parallelization: override the global parallelization settings for this task
  ## async_mode: override the global async_mode settings for this task
  prompt: "prompts/summarize_descriptions.txt"
  max_length: 500

claim_extraction:
  ## llm: override the global llm settings for this task
  ## parallelization: override the global parallelization settings for this task
  ## async_mode: override the global async_mode settings for this task
  enabled: true
  prompt: "prompts/claim_extraction.txt"
  description: "Any claims or facts that could be relevant to information discovery."
  max_gleanings: 1

community_reports:
  ## llm: override the global llm settings for this task
  ## parallelization: override the global parallelization settings for this task
  ## async_mode: override the global async_mode settings for this task
  prompt: "prompts/community_report.txt"
  max_length: 2000
  max_input_length: 8000

cluster_graph:
  max_cluster_size: 10

embed_graph:
  enabled: false # if true, will generate node2vec embeddings for nodes
  # num_walks: 10
  # walk_length: 40
  # window_size: 2
  # iterations: 3
  # random_seed: 597832

umap:
  enabled: false # if true, will generate UMAP embeddings for nodes

snapshots:
  graphml: false
  raw_entities: false
  top_level_nodes: false

local_search:
  # text_unit_prop: 0.5
  # community_prop: 0.1
  # conversation_history_max_turns: 5
  # top_k_mapped_entities: 10
  # top_k_relationships: 10
  # llm_temperature: 0 # temperature for sampling
  # llm_top_p: 1 # top-p sampling
  # llm_n: 1 # Number of completions to generate
  # max_tokens: 12000
  prompt: "prompts/local_search_system_prompt.txt"

global_search:
  # llm_temperature: 0 # temperature for sampling
  # llm_top_p: 1 # top-p sampling
  # llm_n: 1 # Number of completions to generate
  # max_tokens: 12000
  # data_max_tokens: 12000
  # map_max_tokens: 1000
  # reduce_max_tokens: 2000
  # concurrency: 32

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:
@MoonS11 MoonS11 added the triage Default label assignment, indicates new issue needs reviewed by a maintainer label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Default label assignment, indicates new issue needs reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant