知识卡片

普通读书笔记卡 · 6506.c · 生成模型:GPT-6

模型文本不是可信表达式

理解等级:高级

书中把模型文本送入 SymPy parse_expr;官方文档明确其内部使用 eval,不能直接处理未经清理的不可信输入。异常捕获不构成隔离。实际工具应限定表达式语法并在受资源和权限限制的环境中处理,不能把教学示例直接变成开放服务。补充依据:SymPy 解析文档。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      takes an input expression, such as the normalized answers we extract from the LLM response, and converts it into a SymPy object that can be reliably compared for mathematical equivalence. To do so, it applies SymPy's standard parsing rules, supports implicit multiplication like (2y instead of 2*y), and also simplifies basic arithmetic (so 2+3 becomes 5).

    参考来源

    - 位置:《Build a Reasoning Model (From Scratch)》第03章《评估推理模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Build a Reasoning Model (From Scratch)/_epub-src/OEBPS/Text/chapter-3.html) - 结论依据:摘录中关于模型文本不是可信表达式的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:takes an input expression, such as the normalized answers we extract from the LLM response, and converts it into a SymPy object that can be reliably compared for mathematical equivalence. To do so, it applies SymPy's standard parsing rules, supports implicit multiplication like (2y instead of 2*y), and also simplifies basic arithmetic (so 2+3 becomes 5).