Replies: 6 comments 1 reply
-
|
Great question! Both tools have their place depending on your use case: Code Interpreter:
Hosted Shell:
For Excel analysis specifically, I would stick with Code Interpreter if you are doing:
The hosted shell is better for simpler file operations or when you need to chain with other tools. One tip: if you are hitting file size limits, consider pre-processing the Excel to CSV, or splitting into smaller chunks before sending to the API. We have built several Excel-to-insights pipelines at Revolution AI - happy to share more patterns if you have specific use cases! |
Beta Was this translation helpful? Give feedback.
-
|
Great question! At RevolutionAI (https://revolutionai.io) we have done extensive Excel analysis with both approaches. Code Interpreter pros:
Hosted Shell pros:
Our recommendation: Start with Code Interpreter for prototyping, move to Hosted Shell when you need:
For pure Excel analysis without external dependencies, Code Interpreter is usually sufficient and simpler to manage! |
Beta Was this translation helpful? Give feedback.
-
|
Excel analysis options! At RevolutionAI (https://revolutionai.io) we build data analysis tools. Options:
assistant = client.beta.assistants.create(
model="gpt-4-turbo",
tools=[{"type": "code_interpreter"}]
)
# Upload Excel, it analyzes in sandbox
@tool
def analyze_excel(file_path: str, query: str) -> str:
df = pd.read_excel(file_path)
# Generate and execute analysis code
return result
from e2b_code_interpreter import CodeInterpreter
with CodeInterpreter() as sandbox:
sandbox.upload_file("data.xlsx")
result = sandbox.run_python(analysis_code)Recommendation:
What scale are you operating at? |
Beta Was this translation helpful? Give feedback.
-
|
tbh for pure excel analysis - stay with code interpreter. it already handles multi-sheet workbooks, has pandas/openpyxl built in, and the sandbox is reliable for this kind of thing. hosted shell is for when you need more control - custom library versions, persistent state between calls, or integrating with your own infra. if you're just uploading a file and analysing it, you're adding complexity for no real benefit. one case where i would consider switching: if your xlsx files are consistently very large (100k+ rows) or you need something that code interpreter does not have installed. otherwise do not fix what is not broken - code interpreter is the simpler path here. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @levanify, Great question. Having built several automated financial reporting pipelines (integrating tools like Accountfy with LLMs), the choice between Code Interpreter and a Hosted Shell (like E2B or a custom Docker sandbox) should be driven by your Data Governance and Compliance requirements rather than just features. Here is an architectural breakdown to help you decide:
Pros: Zero infra management; standard libraries (pandas, openpyxl) are always there; seamless integration with the Assistants API. Cons: "Black box" environment. You have limited visibility into logs for auditing, and you cannot easily persist a specific environment configuration across different runs.
Auditability: You can capture every line of code executed and every system call. This is mandatory for IT Governance and compliance audits (SOX, LGPD/GDPR). Library Control: If you need specific versions of libraries to match your local production environment (to avoid "it works on my machine" bugs), Hosted Shells allow you to pre-install precise dependencies. Complex Workflows: If your Excel analysis needs to query an external SQL database or a private API to fetch exchange rates or COA (Chart of Accounts) mapping during execution, a Hosted Shell provides the network control that Code Interpreter lacks. 🚀 Pro-Tip for Financial Workflows: Verdict: - Prototyping/Ad-hoc: Code Interpreter. Enterprise/Financial Governance: Hosted Shell. If you value traceability of how your financial KPIs are being calculated, moving to a Hosted Shell is a step toward a more "production-ready" architecture. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @levanify, Thanks for starting this discussion! When dealing with AI/LLM integrations, Vector DBs, or agent frameworks, quirks like this can usually be traced back to a few specific moving parts:
If you are still blocked, providing a minimal reproducible snippet or logging the raw request/response payload (scrubbed of secrets) usually helps pinpoint the exact failure layer much faster. Hope this helps point you in the right direction. Let me know if you make any progress! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m using OpenAI API to analyse .xlsx file. Have been using “code interpreter” tool. Just wondering with the new “hosted shell” tool, is it better to change to that?
Appreciate if there is any guidance or anyone can share their experience. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions