{"id":56637,"date":"2025-08-14T21:14:45","date_gmt":"2025-08-14T13:14:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/56637.html"},"modified":"2025-08-14T21:14:45","modified_gmt":"2025-08-14T13:14:45","slug":"%e7%94%a8-100-%e8%a1%8c-python-%e6%8a%8a-llm-%e5%8f%98%e6%88%90%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90%e5%b8%88-%e9%9b%b6-sql-%e7%9a%84-nl2chart-%e5%ae%9e%e6%88%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/56637.html","title":{"rendered":"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218"},"content":{"rendered":"<p>\u6700\u8fd1\u7814\u5b66\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u4e86\u4e00\u4e2a\u5de8\u725b\u7684\u4eba\u5de5\u667a\u80fd\u5b66\u4e60\u7f51\u7ad9&#xff0c;\u901a\u4fd7\u6613\u61c2&#xff0c;\u98ce\u8da3\u5e7d\u9ed8&#xff0c;\u5fcd\u4e0d\u4f4f\u5206\u4eab\u4e00\u4e0b\u7ed9\u5927\u5bb6\u3002\u70b9\u51fb\u94fe\u63a5\u8df3\u8f6c\u5230\u7f51\u7ad9\u4eba\u5de5\u667a\u80fd\u53ca\u7f16\u7a0b\u8bed\u8a00\u5b66\u4e60\u6559\u7a0b\u3002\u8bfb\u8005\u4eec\u53ef\u4ee5\u901a\u8fc7\u91cc\u9762\u7684\u6587\u7ae0\u8be6\u7ec6\u4e86\u89e3\u4e00\u4e0b\u4eba\u5de5\u667a\u80fd\u53ca\u5176\u7f16\u7a0b\u7b49\u6559\u7a0b\u548c\u5b66\u4e60\u65b9\u6cd5\u3002\u4e0b\u9762\u5f00\u59cb\u5bf9\u6b63\u6587\u5185\u5bb9\u7684\u4ecb\u7ecd\u3002<\/p>\n<p>\u6807\u7b7e&#xff1a;\u5927\u6a21\u578b\u3001Text2SQL\u3001NL2Chart\u3001PandasAI\u3001LangChain\u3001\u53ef\u89c6\u5316\u3001\u96f6\u4ee3\u7801 &#8212;- 1. \u80cc\u666f&#xff1a;\u4e1a\u52a1\u4eba\u5458\u60f3\u8981\u201c\u8bf4\u53e5\u8bdd\u5c31\u51fa\u56fe\u201d \u516c\u53f8\u6bcf\u6708\u7ecf\u8425\u590d\u76d8\u4f1a\u524d&#xff0c;\u4e1a\u52a1\u540c\u5b66\u628a\u9700\u6c42\u7529\u7ed9\u6570\u636e\u56e2\u961f&#xff1a; \u201c\u7ed9\u6211\u4e00\u5f20\u6700\u8fd1 30 \u5929 GMV \u8d8b\u52bf\u56fe&#xff0c;\u6309\u6e20\u9053\u62c6\u5206\u3002\u201d \u7ecf\u5178\u6d41\u7a0b&#xff1a; \u9700\u6c42 \u2192 \u6570\u636e\u540c\u5b66\u5199 SQL \u2192 Excel \u900f\u89c6 \u2192 \u51fa\u56fe \u2192 \u8fd4\u5de5 \u2192 3 \u5c0f\u65f6\u6ca1\u4e86\u3002 \u76ee\u6807&#xff1a;\u4e00\u53e5\u8bdd\u76f4\u63a5\u51fa\u56fe&#xff0c;\u4e14 \u4e0d\u66b4\u9732\u6570\u636e\u5e93&#xff0c;\u4e0d\u6cc4\u9732\u539f\u59cb\u6570\u636e\u3002 &#8212;- 2. \u6280\u672f\u9009\u578b&#xff1a;LLM &#043; PandasAI &#043; \u672c\u5730\u7f13\u5b58 \u6a21\u5757\u00a0\u00a0 \u00a0\u9009\u578b\u00a0\u00a0 \u00a0\u539f\u56e0 \u5927\u6a21\u578b\u00a0\u00a0 \u00a0gpt-3.5-turbo-16k\u00a0\u00a0 \u00a0\u4fbf\u5b9c\u3001\u4ee3\u7801\u80fd\u529b\u5f3a \u6570\u636e\u5f15\u64ce\u00a0\u00a0 \u00a0DuckDB &#043; PandasAI\u00a0\u00a0 \u00a0\u672c\u5730 parquet&#xff0c;\u65e0 SQL \u66b4\u9732 \u53ef\u89c6\u5316\u00a0\u00a0 \u00a0Altair\u00a0\u00a0 \u00a0\u8bed\u6cd5\u7b80\u6d01&#xff0c;\u81ea\u52a8\u751f\u6210\u4ea4\u4e92\u56fe \u4ea4\u4e92\u00a0\u00a0 \u00a0Streamlit\u00a0\u00a0 \u00a010 \u5206\u949f\u51fa\u754c\u9762 &#8212;- 3. \u7cfb\u7edf\u6d41\u7a0b&#xff1a;\u4e00\u53e5\u8bdd \u2192 \u56fe\u8868 \u7528\u6237\u8f93\u5165\u81ea\u7136\u8bed\u8a00 \u00a0 \u00a0 \u2193 LangChain Prompt LLM \u751f\u6210 DuckDB SQL &#043; Altair Python \u00a0 \u00a0 \u2193 Streamlit exec \u56fe\u8868\u6e32\u67d3 &#043; \u7f13\u5b58<\/p>\n<p>&#8212;- 4. 100 \u884c\u6838\u5fc3\u4ee3\u7801<\/p>\n<p># app.py<br \/>\nimport streamlit as st<br \/>\nfrom pandasai import SmartDataframe<br \/>\nfrom pandasai.llm import OpenAI<br \/>\nimport duckdb, os, altair as alt<\/p>\n<p>&#064;st.cache_data<br \/>\ndef load_data():<br \/>\n\u00a0 \u00a0 return duckdb.sql(&#034;SELECT * FROM &#039;sales.parquet&#039;&#034;).df()<\/p>\n<p>llm &#061; OpenAI(api_token&#061;os.getenv(&#034;OPENAI_API_KEY&#034;))<br \/>\ndf &#061; load_data()<br \/>\nsdf &#061; SmartDataframe(df, config&#061;{&#034;llm&#034;: llm})<\/p>\n<p>query &#061; st.text_input(&#034;\u8bf4\u53e5\u8bdd\u51fa\u56fe&#xff1a;&#034;)<br \/>\nif query:<br \/>\n\u00a0 \u00a0 try:<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 code &#061; sdf.chat(query)<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 exec(code) \u00a0# \u751f\u6210 alt.Chart(&#8230;)<br \/>\n\u00a0 \u00a0 except Exception as e:<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 st.error(&#034;LLM \u5199\u9519\u4ee3\u7801\u5566&#xff1a;&#034; &#043; str(e)) <\/p>\n<p>&#8212;- 5. Prompt \u6a21\u677f&#xff08;\u8ba9 LLM \u4e0d\u4e71\u9020&#xff09;<\/p>\n<p>PROMPT &#061; &#034;&#034;&#034;<br \/>\n\u4f60\u662f\u4e00\u540d\u6570\u636e\u5206\u6790\u5e08&#xff0c;\u53ea\u4f7f\u7528 DuckDB SQL \u548c Altair\u3002<br \/>\n\u8868\u5b57\u6bb5&#xff1a;date, channel, gmv, orders\u3002<br \/>\n\u8981\u6c42&#xff1a;<br \/>\n1. \u751f\u6210 DuckDB SQL \u8fc7\u6ee4\u6570\u636e&#xff1b;<br \/>\n2. \u751f\u6210 alt.Chart \u4ee3\u7801&#xff1b;<br \/>\n3. \u4e0d\u8981\u66b4\u9732\u771f\u5b9e\u6570\u636e\u3002<br \/>\n&#034;&#034;&#034; <\/p>\n<p>&#8212;- 6. \u5b9e\u6d4b\u6848\u4f8b \u7528\u6237\u8f93\u5165\u00a0\u00a0 \u00a0\u751f\u6210\u56fe\u8868\u00a0\u00a0 \u00a0\u8017\u65f6 \u201c\u6700\u8fd1 30 \u5929 GMV \u8d8b\u52bf\u201d\u00a0\u00a0 \u00a0\u6298\u7ebf\u56fe\u00a0\u00a0 \u00a01.2 s \u201c\u5404\u6e20\u9053 GMV \u5360\u6bd4\u201d\u00a0\u00a0 \u00a0\u73af\u5f62\u56fe\u00a0\u00a0 \u00a01.1 s \u201cGMV \u4e0e\u8ba2\u5355\u91cf\u6563\u70b9\u201d\u00a0\u00a0 \u00a0\u6c14\u6ce1\u56fe\u00a0\u00a0 \u00a01.3 s &#8212;- 7. \u6027\u80fd &amp; \u5b89\u5168 \u2022 \u00a0\u6570\u636e\u672c\u5730&#xff1a;sales.parquet \u4ec5 50 MB&#xff0c;\u4e0d\u843d\u76d8\u3002 \u2022 \u00a0\u6743\u9650\u9694\u79bb&#xff1a;LLM \u62ff\u4e0d\u5230\u539f\u59cb\u6570\u636e&#xff0c;\u4ec5\u89c1\u805a\u5408\u7ed3\u679c\u3002 \u2022 \u00a0\u7f13\u5b58&#xff1a;\u76f8\u540c\u63d0\u95ee 0.2 s \u8fd4\u56de\u7ed3\u679c\u3002 &#8212;- 8. \u8e29\u5751\u65e5\u8bb0 \u5751\u00a0\u00a0 \u00a0\u89e3\u51b3 LLM \u5199 SQL \u5b57\u6bb5\u540d\u5927\u5c0f\u5199\u9519\u00a0\u00a0 \u00a0DuckDB \u4e0d\u533a\u5206\u5927\u5c0f\u5199&#xff0c;\u81ea\u52a8\u5bb9\u9519 \u56fe\u8868\u4e2d\u6587\u4e71\u7801\u00a0\u00a0 \u00a0Altair \u9ed8\u8ba4\u5b57\u4f53 \u2192 \u6307\u5b9a\u601d\u6e90\u9ed1\u4f53 \u591a\u6b21\u63d0\u95ee\u4e0a\u4e0b\u6587\u51b2\u7a81\u00a0\u00a0 \u00a0\u6bcf\u6b21\u91cd\u7f6e SmartDataframe \u5b9e\u4f8b &#8212;- 9. \u4e00\u952e\u90e8\u7f72<\/p>\n<p>pip install pandasai streamlit duckdb altair<br \/>\nstreamlit run app.py <\/p>\n<p>\u6d4f\u89c8\u5668\u6253\u5f00 http:\/\/localhost:8501&#xff0c;\u4e1a\u52a1\u540c\u5b66\u5373\u53ef\u81ea\u52a9\u51fa\u56fe\u3002 &#8212;- 10. \u7ed3\u8bed&#xff1a;\u8ba9 SQL \u6d88\u5931\u5728\u5bf9\u8bdd\u91cc \u5f53\u4e1a\u52a1\u4eba\u5458\u53ea\u9700\u8981\u8bf4 \u201c\u7ed9\u6211\u4e00\u5f20\u56fe\u201d&#xff0c; \u5f53\u6570\u636e\u56e2\u961f\u4e0d\u518d\u9700\u8981\u71ac\u591c\u5199 SQL&#xff0c; \u4f60\u4f1a\u53d1\u73b0 \u5927\u6a21\u578b\u771f\u6b63\u7684 killer app \u662f\u201c\u6d88\u706d\u4e2d\u95f4\u5c42\u201d\u3002 \u5982\u679c\u8fd9\u7bc7\u6587\u7ae0\u5e2e\u4f60\u8282\u7701\u4e86\u4e00\u6b21\u8fd4\u5de5&#xff0c;\u6b22\u8fce\u70b9\u4e2a Star&#xff1b; \u4e5f\u6b22\u8fce\u7559\u8a00\u804a\u804a\u4f60\u8ba9 LLM \u5199\u8fc7\u54ea\u4e9b\u201c\u79bb\u8c31\u201d\u7684 SQL&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e45\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u5229\u7528\u5927\u6a21\u578b\u6280\u672f\u5b9e\u73b0&quot;\u81ea\u7136\u8bed\u8a00\u76f4\u63a5\u751f\u6210\u56fe\u8868&quot;\u7684\u529f\u80fd\u3002\u901a\u8fc7\u6574\u5408LangChain\u3001PandasAI\u548cDuckDB\u7b49\u6280\u672f\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a100\u884c\u4ee3\u7801\u4ee5\u5185\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4e1a\u52a1\u4eba\u5458\u53ea\u9700\u8f93\u5165\u81ea\u7136\u8bed\u8a00\u63cf\u8ff0\uff08\u5982&quot;\u6700\u8fd130\u5929GMV\u8d8b\u52bf&quot;\uff09\uff0c\u7cfb\u7edf\u5373\u53ef\u57281\u79d2\u5de6\u53f3\u81ea\u52a8\u751f\u6210\u76f8\u5e94\u53ef\u89c6\u5316\u56fe\u8868\u3002\u8be5\u7cfb\u7edf\u91c7\u7528\u672c\u5730parquet\u6587\u4ef6\u5b58\u50a8\u6570\u636e\uff0c\u4e0d\u66b4\u9732\u6570\u636e\u5e93\uff0c\u901a\u8fc7Prompt\u5de5\u7a0b\u7ea6\u675fLLM\u8f93\u51fa\u89c4\u8303\u7684DuckDB SQL\u548cAltair\u56fe\u8868\u4ee3\u7801\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,187,81,101,768,100,5895,86],"topic":[],"class_list":["post-56637","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-javascript","tag-python","tag-spring","tag-sql","tag-100","tag-5895","tag-86"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/56637.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e45\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u5229\u7528\u5927\u6a21\u578b\u6280\u672f\u5b9e\u73b0&quot;\u81ea\u7136\u8bed\u8a00\u76f4\u63a5\u751f\u6210\u56fe\u8868&quot;\u7684\u529f\u80fd\u3002\u901a\u8fc7\u6574\u5408LangChain\u3001PandasAI\u548cDuckDB\u7b49\u6280\u672f\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a100\u884c\u4ee3\u7801\u4ee5\u5185\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4e1a\u52a1\u4eba\u5458\u53ea\u9700\u8f93\u5165\u81ea\u7136\u8bed\u8a00\u63cf\u8ff0\uff08\u5982&quot;\u6700\u8fd130\u5929GMV\u8d8b\u52bf&quot;\uff09\uff0c\u7cfb\u7edf\u5373\u53ef\u57281\u79d2\u5de6\u53f3\u81ea\u52a8\u751f\u6210\u76f8\u5e94\u53ef\u89c6\u5316\u56fe\u8868\u3002\u8be5\u7cfb\u7edf\u91c7\u7528\u672c\u5730parquet\u6587\u4ef6\u5b58\u50a8\u6570\u636e\uff0c\u4e0d\u66b4\u9732\u6570\u636e\u5e93\uff0c\u901a\u8fc7Prompt\u5de5\u7a0b\u7ea6\u675fLLM\u8f93\u51fa\u89c4\u8303\u7684DuckDB SQL\u548cAltair\u56fe\u8868\u4ee3\u7801\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/56637.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T13:14:45+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56637.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/56637.html\",\"name\":\"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T13:14:45+00:00\",\"dateModified\":\"2025-08-14T13:14:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/56637.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/56637.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56637.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/56637.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e45\u6b21\uff0c\u6536\u85cf7\u6b21\u3002\u6458\u8981\uff1a\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u5229\u7528\u5927\u6a21\u578b\u6280\u672f\u5b9e\u73b0&quot;\u81ea\u7136\u8bed\u8a00\u76f4\u63a5\u751f\u6210\u56fe\u8868&quot;\u7684\u529f\u80fd\u3002\u901a\u8fc7\u6574\u5408LangChain\u3001PandasAI\u548cDuckDB\u7b49\u6280\u672f\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a100\u884c\u4ee3\u7801\u4ee5\u5185\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u4e1a\u52a1\u4eba\u5458\u53ea\u9700\u8f93\u5165\u81ea\u7136\u8bed\u8a00\u63cf\u8ff0\uff08\u5982&quot;\u6700\u8fd130\u5929GMV\u8d8b\u52bf&quot;\uff09\uff0c\u7cfb\u7edf\u5373\u53ef\u57281\u79d2\u5de6\u53f3\u81ea\u52a8\u751f\u6210\u76f8\u5e94\u53ef\u89c6\u5316\u56fe\u8868\u3002\u8be5\u7cfb\u7edf\u91c7\u7528\u672c\u5730parquet\u6587\u4ef6\u5b58\u50a8\u6570\u636e\uff0c\u4e0d\u66b4\u9732\u6570\u636e\u5e93\uff0c\u901a\u8fc7Prompt\u5de5\u7a0b\u7ea6\u675fLLM\u8f93\u51fa\u89c4\u8303\u7684DuckDB SQL\u548cAltair\u56fe\u8868\u4ee3\u7801\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/56637.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T13:14:45+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/56637.html","url":"https:\/\/www.wsisp.com\/helps\/56637.html","name":"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T13:14:45+00:00","dateModified":"2025-08-14T13:14:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/56637.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/56637.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/56637.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7528 100 \u884c Python \u628a LLM \u53d8\u6210\u201c\u6570\u636e\u5206\u6790\u5e08\u201d\u2014\u2014\u96f6 SQL \u7684 NL2Chart \u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=56637"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56637\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=56637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=56637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=56637"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=56637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}