Flink 2.1:面向数据和人工智能的 SQL 高级功能.pdf

编号:991741 PDF 27页 4.46MB 下载积分:VIP专享
下载报告请您先登录!

1、Flink 2.1:SQL Advances for Data+AIBridging real-time data processing and AI in Flink SQLLincoln Lee Alibaba CloudStaff Engineer,Apache Flink PMCLLM UDFIntegrate AI Analytics into Real-Time PipelineHuman Reviewtable product(id BIGINT,title VARCHAR,country INT category VARCHAR)table risk_output(id BIG

2、INT,title VARCHAR,forbidden_words VARCHAR hit_keywords VARCHAR)Product title:grape juice(no alcohol)LLMUnderstand no alcoholMeans doesnt contain alcoholno riskclass OpenAIUDF extends ScalarFunction void open()/initOpenAIClient.String eval(String title)/1.prepare ChatCompletionCreateParams/2.return c

3、lient.chat().completions().create.The Hidden Costs of Custom AI UDFLLM UDFOpenAItry different models 1 seconds3 secondssynchronize requestlow throughput async request higher throughputScalarFunctionAsyncScalarFunctionrewrite coderewrite codeApache Flink SQL Native AI FunctionCreate ModelCREATE MODEL

4、 my_modelINPUT(input STRING)OUTPUT(content STRING)WITH(provider=openai/modelScope/,model=gpt-4o/deepseek/qwen/,endpoint=https:/,systemPrompt=)Chat/CompletionSELECT *,content as ai_result FROM ML_PREDICT(TABLE user_feedbacks,MODELmy_model,DESCRIPTOR(feedback),MAPasync,true)SELECT *,content as feature

5、sFROM ML_PREDICT(TABLE input,MODELmy_embedding_model,DESCRIPTOR(question),MAPasync,true)Embeddingmodel managementSQL AI function JSON is important for AIJSON Everywhere:From Big Data to AISearch documentEvent logsJSON_QUERYJSON_VALUEJSON_STRINGJSON_OBJECTJSON_EXISTSJSON_ARRAYSemi-structured JSON Dat

6、aBuilt-in JSON FunctionsProcess JSON StringRAG documentLLM prompts/outputAPI payload JSONJSONparsing”events The Hidden Cost of JSON ParsinguserId:u123,events:type:click,ts:1717230000,type:purchase,ts:1717230033,amount:59.9,metadata:browser:Chrome,device:MobileJSON DocumentRequires parsing every time

友情提示

1、下载报告失败解决办法
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站报告下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

本文(Flink 2.1:面向数据和人工智能的 SQL 高级功能.pdf)为本站 (可不可以) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。
客服
商务合作
小程序
服务号
折叠