[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":86,"blog-\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot":663,"blog-author-\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot":1142,"i-material-symbols:arrow-back-rounded":1157},{"id":4,"extension":5,"footer":6,"header":73,"meta":83,"stem":84,"__hash__":85},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":13,"legal":63},{"name":8,"tagline":9,"downloadCta":10},"Pieces","The memory layer for modern work.",{"label":11,"href":12},"All downloads","\u002Fdownloads",[14,26,39,51],{"title":15,"links":16},"Product",[17,20,23],{"label":18,"href":19},"Pieces Desktop","\u002F",{"label":21,"href":22},"Pieces Enterprise","\u002Fenterprise",{"label":24,"href":25},"Pieces MCP","\u002Fmcp",{"title":27,"links":28},"Resources",[29,33,36],{"label":30,"href":31,"external":32},"Documentation","url:docs.home",true,{"label":34,"href":35},"Blog","\u002Fblog",{"label":37,"href":38,"external":32},"GitHub","url:github.org",{"title":40,"links":41},"Community",[42,45,48],{"label":43,"href":44,"external":32},"Discord","url:social.discord",{"label":46,"href":47,"external":32},"X \u002F Twitter","url:social.x",{"label":49,"href":50,"external":32},"LinkedIn","url:social.linkedin",{"title":52,"links":53},"Company",[54,57,60],{"label":55,"href":56},"About","\u002Fabout",{"label":58,"href":59},"Updates","\u002Fupdates",{"label":61,"href":62},"Contact","\u002Fcontact",[64,67,70],{"label":65,"href":66},"Privacy Policy","\u002Flegal\u002Fprivacy",{"label":68,"href":69},"Refund Policy","\u002Flegal\u002Frefund",{"label":71,"href":72},"Terms of Service","\u002Flegal\u002Fterms",{"links":74,"signIn":75,"contact":78,"cta":80},[],{"label":76,"href":77},"Sign in","url:portal.home",{"label":79,"href":62},"Get in touch",{"label":81,"href":82},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","VdirGIa8cUm6xLprbBeTKcw914JfyJjWfF-9hSVOX5Y",{"id":87,"extension":5,"links":88,"meta":660,"stem":661,"__hash__":662},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,295,299,303,306,310,314,318,322,326,330,334,338,342,346,350,354,358,362,366,370,374,378,382,386,390,394,398,402,406,410,414,418,422,426,430,434,438,442,446,450,453,457,461,465,469,473,477,480,483,486,489,493,497,500,504,508,512,516,520,524,528,532,536,540,544,548,551,555,559,563,567,571,574,577,580,584,587,591,595,599,603,606,610,614,617,620,623,627,631,635,638,641,644,648,652,656],{"key":90,"label":91,"href":92},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":94,"label":95,"href":96},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":98,"label":99,"href":100},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":102,"label":103,"href":104},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":106,"label":107,"href":108},"downloads.macOS.universal","Desktop macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fmacos-universal\u002Fdownload",{"key":110,"label":111,"href":112},"downloads.macOS.pkgArm64","Desktop macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd-arm64\u002Fdownload",{"key":114,"label":115,"href":116},"downloads.macOS.pkgIntel","Desktop macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pfd\u002Fdownload",{"key":118,"label":119,"href":120},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":122,"label":123,"href":124},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":126,"label":127,"href":128},"downloads.windows.msix","Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-msix\u002Fdownload",{"key":130,"label":131,"href":132},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":134,"label":135,"href":136},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":138,"label":139,"href":140},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":142,"label":143,"href":144},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":146,"label":147,"href":148},"downloads.linux.snap","Desktop Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fsnap\u002Fdownload",{"key":150,"label":151,"href":152},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":154,"label":155,"href":156},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":158,"label":159,"href":160},"downloads.piecesOS.macOS.universal","PiecesOS macOS Universal","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fmacos-universal\u002Fdownload",{"key":162,"label":163,"href":164},"downloads.piecesOS.macOS.pkgArm64","PiecesOS macOS PKG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only-arm64\u002Fdownload",{"key":166,"label":167,"href":168},"downloads.piecesOS.macOS.pkgIntel","PiecesOS macOS PKG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-pos-launch-only\u002Fdownload",{"key":170,"label":171,"href":172},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":174,"label":175,"href":176},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":178,"label":179,"href":180},"downloads.piecesOS.windows.msix","PiecesOS Windows MSIX","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-msix\u002Fdownload",{"key":182,"label":183,"href":184},"downloads.piecesOS.linux.snap","PiecesOS Linux Snap package","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fsnap\u002Fdownload",{"key":186,"label":187,"href":188},"downloads.combined.macOS.appleSilicon","Combined macOS installer Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg-arm64\u002Fdownload",{"key":190,"label":191,"href":104},"downloads.combined.macOS.intel","Combined macOS installer Intel",{"key":193,"label":194,"href":195},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":197,"label":198,"href":199},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":201,"label":202,"href":203},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":205,"label":206,"href":207},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":209,"label":210,"href":211},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":213,"label":214,"href":215},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":217,"label":218,"href":219},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":221,"label":222,"href":223},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":225,"label":226,"href":227},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":229,"label":230,"href":231},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":233,"label":234,"href":235},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":237,"label":238,"href":239},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":241,"label":242,"href":243},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":245,"label":246,"href":247},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":249,"label":250,"href":251},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":253,"label":254,"href":255},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":257,"label":258,"href":259},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":261,"label":262,"href":263},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":265,"label":266,"href":267},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":269,"label":270,"href":271},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":273,"label":274,"href":275},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":277,"label":278,"href":279},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":281,"label":282,"href":283},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":285,"label":286,"href":287},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":289,"label":290,"href":291},"docs.desktop.account","Desktop account settings docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconfiguration\u002Faccount",{"key":293,"label":294,"href":92},"docs.desktop.download","Desktop download docs",{"key":296,"label":297,"href":298},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":300,"label":301,"href":302},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":304,"label":305,"href":207},"docs.piecesOS.install","PiecesOS install docs",{"key":307,"label":308,"href":309},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":311,"label":312,"href":313},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":315,"label":316,"href":317},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":319,"label":320,"href":321},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":323,"label":324,"href":325},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":327,"label":328,"href":329},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":331,"label":332,"href":333},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":335,"label":336,"href":337},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":339,"label":340,"href":341},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":343,"label":344,"href":345},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":347,"label":348,"href":349},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":351,"label":352,"href":353},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":355,"label":356,"href":357},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":359,"label":360,"href":361},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":363,"label":364,"href":365},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":367,"label":368,"href":369},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":371,"label":372,"href":373},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":375,"label":376,"href":377},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":379,"label":380,"href":381},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":383,"label":384,"href":385},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":387,"label":388,"href":389},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":391,"label":392,"href":393},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":395,"label":396,"href":397},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":399,"label":400,"href":401},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":403,"label":404,"href":405},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":407,"label":408,"href":409},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":411,"label":412,"href":413},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":415,"label":416,"href":417},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":419,"label":420,"href":421},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":423,"label":424,"href":425},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":427,"label":428,"href":429},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":431,"label":432,"href":433},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":435,"label":436,"href":437},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":439,"label":440,"href":441},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":443,"label":444,"href":445},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":447,"label":448,"href":449},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":451,"label":58,"href":452},"site.updates","https:\u002F\u002Fpieces.app\u002Fupdates",{"key":454,"label":455,"href":456},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":458,"label":459,"href":460},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":462,"label":463,"href":464},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":466,"label":467,"href":468},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":470,"label":471,"href":472},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":474,"label":475,"href":476},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":478,"label":34,"href":479},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":481,"label":43,"href":482},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":484,"label":46,"href":485},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":487,"label":488,"href":485},"social.twitter","Twitter",{"key":490,"label":491,"href":492},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":494,"label":495,"href":496},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":498,"label":49,"href":499},"social.linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":501,"label":502,"href":503},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":505,"label":506,"href":507},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":509,"label":510,"href":511},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":513,"label":514,"href":515},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":517,"label":518,"href":519},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":521,"label":522,"href":523},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":525,"label":526,"href":527},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":529,"label":530,"href":531},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":533,"label":534,"href":535},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":537,"label":538,"href":539},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":541,"label":542,"href":543},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":545,"label":546,"href":547},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":549,"label":550,"href":247},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":552,"label":553,"href":554},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":556,"label":557,"href":558},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":560,"label":561,"href":562},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":564,"label":565,"href":566},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":568,"label":569,"href":570},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":572,"label":573,"href":66},"legal.privacyPolicy","Privacy policy",{"key":575,"label":576,"href":69},"legal.refundPolicy","Refund policy",{"key":578,"label":579,"href":72},"legal.terms","Terms",{"key":581,"label":582,"href":583},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":585,"label":586,"href":503},"videos.youtubeChannel","YouTube channel",{"key":588,"label":589,"href":590},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":592,"label":593,"href":594},"videos.snippetDiscoveryxR","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":596,"label":597,"href":598},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":600,"label":601,"href":602},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":604,"label":605,"href":519},"sales.feedback","Feedback discussions",{"key":607,"label":608,"href":609},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":611,"label":612,"href":613},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":615,"label":616,"href":19},"routes.home","Home route",{"key":618,"label":619,"href":56},"routes.about","About route",{"key":621,"label":622,"href":12},"routes.downloads","Downloads route",{"key":624,"label":625,"href":626},"routes.thanks","Post-install thanks route","\u002Finstall\u002Fthanks",{"key":628,"label":629,"href":630},"routes.pricing","Pricing route","\u002Fpricing",{"key":632,"label":633,"href":634},"cta.freeTrial","Start free trial CTA (Pieces Pro) — used by \u002Fcampaigns\u002F* landing pages","https:\u002F\u002Fcampaigns.pieces.app\u002F",{"key":636,"label":637,"href":22},"routes.enterprise","Enterprise route",{"key":639,"label":640,"href":62},"routes.contact","Contact route",{"key":642,"label":643,"href":59},"routes.updates","Updates route",{"key":645,"label":646,"href":647},"routes.migrationError","Migration error route","\u002Fmigration\u002Ferror",{"key":649,"label":650,"href":651},"routes.authenticated","Post-login authenticated route","\u002Fauth\u002Fsigned-in",{"key":653,"label":654,"href":655},"routes.signed-out","Signed out route","\u002Fauth\u002Fsigned-out",{"key":657,"label":658,"href":659},"routes.authentication-error","Authentication error route","\u002Fauth\u002Ferror",{},"data\u002Fshared\u002Furls","NLkVE1lIUws518K-1QsSB6T-GvlXYIzcRL1HDhqarGQ",{"id":664,"title":665,"author":666,"authorPhoto":667,"authorPhotoAlt":668,"authorSlug":669,"body":670,"buttonText":1129,"buttonUrl":1129,"category":1130,"date":1131,"description":1132,"draft":1133,"editorsPick":1133,"extension":1134,"featured":1133,"image":1135,"imageAlt":1136,"meta":1137,"navigation":32,"ogImage":1129,"ogImageAlt":1129,"path":1138,"seo":1139,"stem":1140,"tags":1129,"__hash__":1141},"blog\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot.md","How to Build a Langchain PDF Chatbot","Oluwatimilehin Ogidan","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot\u002Fauthor.jpeg","Photo of Oluwatimilehin Ogidan","oluwatimilehin-ogidan",{"type":671,"value":672,"toc":1115},"minimark",[673,685,699,702,707,710,713,716,729,733,742,753,756,760,767,770,784,787,819,822,839,842,845,848,852,855,862,865,871,876,881,886,891,898,905,914,919,922,932,939,945,954,960,977,983,986,990,993,999,1003,1006,1014,1017,1023,1026,1032,1035,1041,1044,1047,1053,1060,1066,1074,1078,1081,1087,1090,1096,1099,1105,1109,1112],[674,675,676,677,684],"p",{},"Have you ever imagined asking questions from the document files on your computer instead of searching for information in them manually? You are not alone; many developers come across this obstacle. Thankfully, the rise of ",[678,679,683],"a",{"href":680,"rel":681},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fconversational-ai-vs-generative-ai-benefits",[682],"nofollow","generative AI and conversational AI"," technology makes this possible.",[674,686,687,688,693,694,698],{},"In 2022, there was a massive explosion of generative AI algorithms. OpenAI released the infamous chatbot, ",[678,689,692],{"href":690,"rel":691},"https:\u002F\u002Fpieces.app\u002Fblog\u002Funleash-the-power-of-openais-chatgpt-top-5-developer-productivity-tools-to-supercharge-your-workflow",[682],"ChatGPT",". It is an acronym for ",[695,696,697],"strong",{},"Chat Generative Pre-trained Transformers",". This sophisticated AI system, powered by deep learning technology, has taken the world by surprise due to its impressive ability to generate human-like text and make conversations with human beings.",[674,700,701],{},"In this article, you are going to be given a brief introduction to Large Language Models (LLMs), learn what the Langchain framework is all about, and how you can build your first Langchain PDF chatbot.",[703,704,706],"h2",{"id":705},"what-are-large-language-models","What are Large Language Models?",[674,708,709],{},"LLMs are machine learning models trained on large amounts of textual data (articles, PDFs, web content) to equip them with an understanding of the underlying statistical and grammatical relationship between the words, thereby enabling them to predict the next sequence of words given an input text (also called prompts).",[674,711,712],{},"Simply put, an LLM is a machine-learning algorithm trained on next-sentence prediction. LLMs are trained using self supervised machine learning techniques. The performance of the language model depends on the quality of the data used to train it. The higher quality the data is, the better its performance.",[674,714,715],{},"The most common example is ChatGPT-3. We also have some other examples of popular LLMs such as:",[717,718,719,723,726],"ul",{},[720,721,722],"li",{},"Llama by Huggingface",[720,724,725],{},"Palm2 by Google",[720,727,728],{},"Cohere by CohereAI",[703,730,732],{"id":731},"limitations-of-chatgpt","Limitations of ChatGPT",[674,734,735,736,741],{},"Many developers ",[678,737,740],{"href":738,"rel":739},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fhow-to-write-code-with-chatgpt",[682],"write code with ChatGPT",", despite its limitations with contextualization based on your existing repositories. Here are some of the other limitations of ChatGPT:",[717,743,744,747,750],{},[720,745,746],{},"Limited knowledge- Its knowledge is based only on the data that was available to it at the time of training. It only has access to information dated before 2021, although the OpenAI team is working to ensure it has access to current data",[720,748,749],{},"Hallucination- This occurs when LLMs give information that is not true",[720,751,752],{},"It doesn't have access to your private data (i.e. data on your system, data on your Google Drive)",[674,754,755],{},"Let's get an understanding of what Langchain is all about before we dive into creating a Langchain PDF chatbot.",[703,757,759],{"id":758},"why-langchain","Why Langchain?",[674,761,762,763,766],{},"The Langchain framework was developed to solve some of the limitations accustomed to using the LLMs. The Langchain is a framework that makes working with language models easy. Also, it gives you the tools and building blocks needed to build ",[695,764,765],{},"“LLM powered”"," applications.",[674,768,769],{},"It enables you to build applications that are:",[717,771,772,778],{},[720,773,774,777],{},[695,775,776],{},"Context-aware"," - They have information relevant to a given user query",[720,779,780,783],{},[695,781,782],{},"Reasoning"," - make use of LLMs to make decisions",[674,785,786],{},"The Langchain framework has some modules that handle different offerings of the framework. These include:",[717,788,789,795,801,807,813],{},[720,790,791,794],{},[695,792,793],{},"Model I\u002FO"," - handles interfacing with LLMs",[720,796,797,800],{},[695,798,799],{},"Retrieval"," - enables retrieval of external data",[720,802,803,806],{},[695,804,805],{},"Chains"," -helps to connect different Langchain components",[720,808,809,812],{},[695,810,811],{},"Agents"," - allows you to use LLMs as reasoning engines",[720,814,815,818],{},[695,816,817],{},"Memory"," - It persists application state",[674,820,821],{},"The Langchain framework has a lot of applications; some of which include:",[717,823,824,827,830,833,836],{},[720,825,826],{},"Chatbot",[720,828,829],{},"Summarization",[720,831,832],{},"Extraction",[720,834,835],{},"Personal assistant",[720,837,838],{},"Querying database",[674,840,841],{},"Although the OpenAI team has done a great job in building ChatGPT, it has a few limitations as aforementioned.",[674,843,844],{},"The Langchain framework is here to help overcome the limitations of ChatGPT and other LLMs.",[674,846,847],{},"At this point, you know what LLMs are all about, examples of some popular LLMs, and how the Langchain framework fits into the picture. Let's proceed to build our chatbot PDF with the Langchain framework.",[703,849,851],{"id":850},"coding-your-langchain-pdf-chatbot","Coding your Langchain PDF Chatbot",[674,853,854],{},"Below is an architectural diagram that shows how the whole system interacts:",[674,856,857],{},[858,859],"img",{"alt":860,"src":861},"An architectural diagram of the chatbot.","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot\u002Fimg-001.png",[674,863,864],{},"Before proceeding to the next session, you must ensure the following Python packages are installed. Run the code cell below to install the required packages.",[674,866,867],{},[868,869,870],"code",{},"!pip install langchain",[674,872,873],{},[868,874,875],{},"!pip install openai",[674,877,878],{},[868,879,880],{},"!pip install PyPDF2",[674,882,883],{},[868,884,885],{},"!pip install faiss-cpu",[674,887,888],{},[868,889,890],{},"!pip install tiktoken",[674,892,893,894,897],{},"The function of the ",[695,895,896],{},"“PyPDF2”"," library is to help us load our PDF document so that we can work with it.",[674,899,900,901,904],{},"The ",[695,902,903],{},"FAISS (Facebook AI Similarity Search)"," library helps us to index and store text embeddings. It was developed by the Facebook AI team to carry out efficient similar searches between vectors. Furthermore, it has support for GPU (Graphics Processing Unit)–which helps to process data at insane speeds.",[674,906,907,908,913],{},"You also need to get an ",[678,909,912],{"href":910,"rel":911},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fopenai-api-supercharges-developer-workflow-pieces",[682],"OpenAI API"," (Application Programming Interface) key from their website.",[915,916,918],"h3",{"id":917},"import-libraries","Import Libraries",[674,920,921],{},"The next step we are going to take is to import the libraries we will be using in building the Langchain PDF chatbot.",[923,924,929],"pre",{"className":925,"code":927,"language":928},[926],"language-text","from PyPDF2 import PdfReader\nfrom langchain.vectorstores import ElasticVectorSearch, Pinecone, Weaviate, FAISS\nfrom langchain.embeddings.openai import OpenAIEmbeddings\nfrom langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter\nimport os\nfrom langchain.chains.question_answering import load_qa_chain\nfrom langchain.llms import OpenAI\n","text",[868,930,927],{"__ignoreMap":931},"",[674,933,934,935,938],{},"The Langchain library offers integration with different vector stores–It is similar to a normal database but this time, it is vectors that are being stored. The ",[695,936,937],{},"\"text_splitter\""," is used by the Langchain library to chunk up the data in the pdf file.",[923,940,943],{"className":941,"code":942,"language":928},[926],"# Get your API keys from Openai, you will need to create an account.\nimport os\nos.environ[\"OPENAI_API_KEY\"] = \"YOURAPIKEY\"\n",[868,944,942],{"__ignoreMap":931},[674,946,947,948,953],{},"Save your ",[678,949,952],{"href":950,"rel":951},"https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys",[682],"OpenAI API key"," in your systems environment–It is good practice to store API keys as environmental variables and call them wherever you need them in your code.",[923,955,958],{"className":956,"code":957,"language":928},[926],"# read in your pdf filepdf_reader = PdfReader(“path to the pdf file”)\n",[868,959,957],{"__ignoreMap":931},[674,961,962,963,966,973,976],{},"The next step is for you to load your PDF document from the location it is stored on your system. For this article, we are going to be using the ",[695,964,965],{},"“",[678,967,970],{"href":968,"rel":969},"https:\u002F\u002Farxiv.org\u002Fabs\u002F2303.08774",[682],[695,971,972],{},"GPT 4 Technical Report",[695,974,975],{},"”."," You can make use of any PDF file of your choice.",[923,978,981],{"className":979,"code":980,"language":928},[926],"# read data from the file and put them into a variable called text\ntext = ''\nfor i, page in enumerate(pdf_reader.pages):\ntext = page.extract_text()\nif text:\ntext += text\n",[868,982,980],{"__ignoreMap":931},[674,984,985],{},"What this line of code does is convert the PDF into text format so that we will be able to break it into chunks.",[915,987,989],{"id":988},"chunk-your-documents","Chunk your Documents",[674,991,992],{},"The next step is to split the PDF document into chunks so that we don't hit the token size limit during information retrieval.",[923,994,997],{"className":995,"code":996,"language":928},[926],"text_splitter = RecursiveCharacterTextSplitter(\nchunk_size = 512,\nchunk_overlap  = 32,\nlength_function = len,\n)\ntexts = text_splitter.split_text(text)\n",[868,998,996],{"__ignoreMap":931},[915,1000,1002],{"id":1001},"what-are-tokens","What are tokens?",[674,1004,1005],{},"The tokenization step is usually one of the preprocessing steps before feeding text data into a language model.",[674,1007,1008,1013],{},[678,1009,1012],{"href":1010,"rel":1011},"https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fsemantic-kernel\u002Fprompt-engineering\u002Ftokens",[682],"Tokenization"," is the process of splitting chunks of text into smaller units that can easily be processed by the LLM.",[674,1015,1016],{},"Tokens are the building blocks of LLMs.They can be as short as a character (i.e. “a”,”d”) or as long as a word (i.e. “play”). The token size limit is the amount of tokens the LLM is allowed to process at once to ensure efficient delivery.",[674,1018,900,1019,1022],{},[868,1020,1021],{},"recursivecharactertextsplitter","helps to split the data in such a way that the semantic meanings between the words are preserved.",[674,1024,1025],{},"We will proceed to download the word embeddings:",[923,1027,1030],{"className":1028,"code":1029,"language":928},[926],"# Download embeddings from OpenAIembeddings = OpenAIEmbeddings()\n",[868,1031,1029],{"__ignoreMap":931},[674,1033,1034],{},"We make use of the embeddings to convert the chunk of text into vectors:",[923,1036,1039],{"className":1037,"code":1038,"language":928},[926],"docsearch = FAISS.from_texts(texts, embeddings)\n",[868,1040,1038],{"__ignoreMap":931},[674,1042,1043],{},"We proceed to create a vector database (our knowledge base) using the FAISS library and the OpenAI embeddings.",[674,1045,1046],{},"Once the database has been created, we can then query it.",[923,1048,1051],{"className":1049,"code":1050,"language":928},[926],"chain = load_qa_chain(OpenAI(), chain_type=\"stuff\")\n",[868,1052,1050],{"__ignoreMap":931},[674,1054,1055,1056,1059],{},"We are making use of the",[868,1057,1058],{},"qa_chain","from Langchain to connect our similarity search to the prompts–user input. Remember that you can use chains for more complex tasks; this is a basic task.",[674,1061,900,1062,1065],{},[695,1063,1064],{},"“temperature”"," parameter determines the degree of randomness of the text generated by the LLM.",[674,1067,900,1068,1073],{},[678,1069,1072],{"href":1070,"rel":1071},"https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fmodules\u002Fchains\u002Fdocument\u002Fstuff",[682],"stuff"," parameter in our qa_chain enables us to build applications like this where documents are small and only a few are passed in for most calls.",[915,1075,1077],{"id":1076},"query-the-pdf","Query the PDF",[674,1079,1080],{},"Finally, we get to ask our PDF questions",[923,1082,1085],{"className":1083,"code":1084,"language":928},[926],"query = \"who are the authors of the article?\"\ndocs = docsearch.similarity_search(query)\nchain.run(input_documents=docs, question=query)\n",[868,1086,1084],{"__ignoreMap":931},[674,1088,1089],{},"This is what the output looks like:",[674,1091,1092],{},[858,1093],{"alt":1094,"src":1095},"The output of the above query.","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot\u002Fimg-002.png",[674,1097,1098],{},"Another question:",[674,1100,1101],{},[858,1102],{"alt":1103,"src":1104},"Answering the question, \"What are the limitations of gpt4?\"","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot\u002Fimg-003.png",[703,1106,1108],{"id":1107},"conclusion","Conclusion",[674,1110,1111],{},"In this article, we have discussed LLMs, their limitations, and how the Langchain framework solves some of their problems. You have also learned how to build your own custom Langchain PDF chatbot.",[674,1113,1114],{},"The new wave of generative AI technology is not going away anytime soon. Building custom Langchain PDF chatbots helps you overcome some of the limitations of traditional LLMs due to its flexible framework. Have fun implementing your PDF chatbot!",{"title":931,"searchDepth":1116,"depth":1116,"links":1117},2,[1118,1119,1120,1121,1128],{"id":705,"depth":1116,"text":706},{"id":731,"depth":1116,"text":732},{"id":758,"depth":1116,"text":759},{"id":850,"depth":1116,"text":851,"children":1122},[1123,1125,1126,1127],{"id":917,"depth":1124,"text":918},3,{"id":988,"depth":1124,"text":989},{"id":1001,"depth":1124,"text":1002},{"id":1076,"depth":1124,"text":1077},{"id":1107,"depth":1116,"text":1108},null,"AI & LLMs","2023-10-31T00:00:00.000Z","This article explores the rise of generative AI and how you can use Langchain to build a PDF chatbot without traditional limitations.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot\u002Fhero.jpeg","A photo of chains.",{},"\u002Fblog\u002Fhow-to-build-a-langchain-pdf-chatbot",{"title":665,"description":1132},"blog\u002Fhow-to-build-a-langchain-pdf-chatbot","DZmj1ObQnFydloNIBFiTHdJoLHVJOOhOkE2SuulZAT8",{"id":1143,"title":666,"body":1144,"description":1148,"draft":1133,"extension":1134,"meta":1151,"navigation":32,"path":1152,"photo":1153,"photoAlt":1129,"seo":1154,"stem":1155,"__hash__":1156},"authors\u002Fauthors\u002Foluwatimilehin-ogidan.md",{"type":671,"value":1145,"toc":1149},[1146],[674,1147,1148],{},"Machine Learning Engineer with a rich background in Mechatronics Engineering. His superpowers are critical thinking, innovation and problem-solving.",{"title":931,"searchDepth":1116,"depth":1116,"links":1150},[],{},"\u002Fauthors\u002Foluwatimilehin-ogidan","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Foluwatimilehin-ogidan.jpg",{"title":666,"description":1148},"authors\u002Foluwatimilehin-ogidan","f-KfIL-5dklx71voYN7HP50tmF1TNx0GOdEn40xD8V4",{"left":1158,"top":1158,"width":1159,"height":1159,"rotate":1158,"vFlip":1133,"hFlip":1133,"body":1160},0,24,"\u003Cpath fill=\"currentColor\" d=\"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z\"\u002F>"]