kai-dong123 commented on issue #185: URL: https://github.com/apache/hugegraph-ai/issues/185#issuecomment-5602307448
> 嗨!我一直在本地运行流水线(通过 Docker 使用 HugeGraph + 一个兼容 OpenAI 的大型语言模型端点),我重现了这里描述的失败类——包括 -即字符串的工件和未明确说明的问题。我想参加这份工作并提交永久居民申请。`rag_demo``"age": "30"``propertykeys` > > 从头到尾追踪,根本原因看起来有两层: > > **1. 提示符/配置合同不一致。** 的shipping没有类型化,因此退回并声明所有属性——而提取提示自身的引用示例声明为INT。同一文件的两半存在分歧,因此结果取决于模型“错过”的方向:如果模式最终 实现且模型返回该数字——或者模式说了而模型返回——导入无论如何都会失败。这符合你测试过的模型间差异很大。`config_prompt.yaml``graph_schema``propertykeys``CheckSchema``TEXT``age``TEXT``30``INT``"30"` > > **2. 导入路径将一个坏属性转化为整个顶点的失败。**在 中,如果单个属性值与声明类型不符,代码会跳过_整个顶点_(日志显示“跳过”,但实际上丢失了顶点),任何引用该顶点的边都会被发送到服务器,带有原始本地 ID,失败。我把那份精确的复制品归档为[#373](https://github.com/apache/hugegraph-ai/issues/373)。`commit_to_hugegraph.load_into_graph``continue``Server Exception: Invalid vertex id '1:Sarah'` > > 根据您的偏好,拟议范围: > > * **(a) 配置/提示符对齐**——给出与提示声明类型一致的类型(小型、面向演示);和/或`graph_schema``propertykeys` > * **(b) 完全修复** — 同时加固导入路径(该[[Bug] load_into_graph 在某个属性值与声明类型不符时,丢弃整个顶点,然后边失败,带有一个神秘的“无效顶点 id” #373](https://github.com/apache/hugegraph-ai/issues/373)work):无损强制(数值字符串↔编号,LIST/SET基数的标量→列表,DATE);当_可归性_质不可强制时,只舍弃该性质并保留顶点;当主键/不可空值不可用时,跳过该顶点及其相关边,并有命名理由;从未以无法解决的结局结束;只有在无法进口的情况下才加薪。边缘属性也受到同样的强制力。`yyyy-MM-dd``addEdge` > > 我在本地端到端验证了流程,并在与模式对齐后,可以用单元测试覆盖分支(模拟客户端,不使用外部服务)——其实已经有“中”要求完全符合这种覆盖范围。你希望我继续用(a)、(a)+(b)还是其他方式?`FIXME``hugegraph-llm/src/tests/operators/hugegraph_op/test_commit_to_hugegraph_load_into_graph.py` Hi, gentle follow-up on my message from Sep 7. While checking current HEAD I noticed PR #331 ("resolve edge creation failure due to vertex ID mismatch") is merged — so the LLM-generated vs numeric server vertex-id normalization half of this issue family is handled via vid_mapping. What still reproduces on current code is the other half, tracked in #373: when one property value doesn't match its declared type/format, load_into_graph silently skips the whole vertex, so edges referencing it are sent with an unmapped id and fail server-side with the cryptic "Invalid vertex id". The FIXME at test_commit_to_hugegraph_load_into_graph.py:29 still asks for exactly this coverage, and the current data-type-failure test codifies the silent skip rather than an explicit outcome. If a fix for this residual branch is still wanted, I can open a small PR: lossless coercion (numeric string ↔ number, scalar → LIST/SET), drop only an un-coercible nullable property and keep the vertex, skip a vertex (and name its dependent edges) only when a primary-key value is unusable, and raise only if nothing could be imported — with mock-client unit tests per the FIXME. If it's already covered or not a priority, just say so and I'll leave it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
