GenAI 开发数据准备的最佳实践.pdf

编号:167554 PDF 17页 843.01KB 下载积分:VIP专享
下载报告请您先登录!

GenAI 开发数据准备的最佳实践.pdf

1、2024 Databricks Inc.All rights reservedBest Practices Best Practices for Data Prep for Data Prep for GenAI for GenAI DevelopmentDevelopmentBrian Kihoon LeeBrian Kihoon Lee12024 Databricks Inc.All rights reservedLilac joined Databricks in March 2024We built LLM-superpowered tools to understand and cu

2、rate text data2Lilac x DatabricksLilac x Databricks2024 Databricks Inc.All rights reserved3A typical RAG data pipelineA typical RAG data pipelineextractcurateindexTodays talk2024 Databricks Inc.All rights reserved2024 Databricks Inc.All rights reserved4LIVE DEMO:LIVE DEMO:EXTRACTIONEXTRACTION2024 Da

3、tabricks Inc.All rights reservedPYTHONdef parsed1(filepath):try:doc=pymupdf.open(filepath)#open a documentoutput=n.join(page.get_text()for page in doc)except Exception as e:print(e,filepath)output=return parsed:outputdataset.map(parsed1,input_path=filepath,output_path=parser1,num_jobs=8,execution_ty

4、pe=processes,overwrite=True)Extract data from PDFExtract data from PDF52024 Databricks Inc.All rights reserved6Look at your dataLook at your data2024 Databricks Inc.All rights reservedPYTHONdef parsed2(filepath):try:doc=pymupdf.open(filepath)#open a documenttext_builder=for page in doc:blocks=page.g

5、et_text(blocks)text_builder.append(nn.join(block4.replace(n,)for block in blocks)output=.join(text_builder)except Exception as e:print(e,filepath)output=return parsed:outputdataset.map(parsed2,input_path=filepath,output_path=parser2,num_jobs=8,execution_type=processes)Extract data from PDF,attempt#2

6、Extract data from PDF,attempt#272024 Databricks Inc.All rights reserved8Dont overfit to one documentDont overfit to one document2024 Databricks Inc.All rights reserved9Normalize whitespace and unicodeNormalize whitespace and unicode2024 Databricks Inc.All rights reservedPYTHONfrom unstructured.clean

友情提示

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

本文(GenAI 开发数据准备的最佳实践.pdf)为本站 (张5G) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

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