LangChain:原型設計好,但生產環境不適合!

Ai

🎨 Nano Banana Pro 圖像生成器|打幾句說話就出圖

想畫人像、產品圖、插畫?SSFuture 圖像生成器支援
Flux Gemini Nano Banana Pro 改圖 / 合成
打廣東話都得,仲可以沿用上一張圖繼續微調。

🆓 Flux 模型即玩,不用登入
🤖 登入後解鎖 Gemini 改圖
📷 支援上載參考圖再生成
⚡ 每天免費額度任你玩

✨ 即刻玩 AI 畫圖

Create a sticker set maintaining 100% of the woman's original facial features from the provided image. Do not alter the face, focusing on ultra-realistic details of the facial structure, eyes, eyebrows, nose, mouth, and expression. The final face must be realistic, not cartoon-like. She has long, voluminous hair.
1. Makeup:Maintain Original Face: We will preserve the structure of your face, eyes, eyebrows, nose, mouth, and expression as closely as possible to the original image to maintain naturalness and uniqueness, while adjusting the tone to be softer:

Eyes: Slightly reduce the sharpness of the Cat Eye eyeliner to a thin line close to the lash line for a softer look, while still maintaining eye definition.
Eyeshadow: Use natural tones like light brown, peach, or beige.
Eyebrows: Original shape, but brushed up to look softer and more natural.
Lips: Glossy, pink-tinted, nude-pink, or coral-toned lipstick/tint to make the lips look full and moisturized. Focus on a bright but not overly intense look.
2. Hairstyle:Natural Voluminous Long Hair: Her hair is long and flowing, but the styling will emphasize natural volume and movement. Soft, natural waves.
3. Outfit:

Attire: A white open-back bodysuit paired with distressed, faded blue denim shorts. There is a message "Kunika" on the shirt.
Shoes: Elegant, simple open-toe flat sandals.
Accessories: Styled freely and fittingly for each scene.
4. Poses & Sticker Elements:Poses: Various poses such as waving, jumping, walking playfully, reading a book, holding up a sign, cheering with both hands, stretching, or making a celebratory gesture, to create a cheerful and friendly atmosphere.Decoration: Include elements like small rainbows, sparkling stars, clear bubbles, hearts, balloons, or light-colored dots to decorate and enhance the fun of each sticker scene.Style: Thin black border around the sticker. Use a modern, rounded 'Itim' style font for the text.Text: Add short emotional phrases written in a cute, beautiful script near the sticker (no speech bubbles/text boxes):

"Hello"
"Love you"
"Submitting work"
"Great"
"Got it"
"Thanks!"
"Wait a sec"
"Ready to care"
"Fight"
"Let's do it"
"So cute"
"OK"
"Sweet dreams:
"Get well soon"
"555"
"You're welcome"
"HBD" 
"OMG" 
"Sorry"
"Got a headache" 
Guidelines: Do not include a text box. Ensure balanced composition with sufficient white space—not cluttered. Match the pose to the text.
Emphasis: Reiterate 'maintain 100% of the original face features from the provided image,' 'ultra-realistic facial detail,' and 'professional studio lighting on face (realistic face, not cartoon face).

Use Cantonese in the stickers.
Create a hyper-realistic 8K close-up body portrait of a male model, using the uploaded photo as the exact facial reference. Maintain 100% accuracy of the facial features — do not alter or modify any aspect of the face. Render the skin texture, lighting, and overall composition with photo-realistic detail, ensuring lifelike color tones and natural depth of field. A man with his original hairstyle, he is standing confidently, hands in his pockets, looking directly at the camera. He is wearing a simple, light beige crew-neck sweater and dark trousers.
He is positioned between two decorated Christmas trees. The tree to his left is adorned with gold and white ornaments and warm lights, with wrapped red and gold gifts visible at its base. The tree to his right is decorated with red and gold ornaments. The background shows a warm, indoor setting, likely a home, with soft lighting, creating a festive and inviting atmosphere. The overall impression is one of relaxed holiday cheer.
An intense, close-up portrait set in a smoky, underground jazz club or speakeasy. The subject is the 'Boss' of an information network, hiding in plain sight. The scene is dark, defined by heavy shadows and cigarette smoke swirling in the air. A single spotlight hits the subject from the side, creating a classic 'Rembrandt triangle' on the cheek of [exactly face uploaded image 100%]. He wears a sharp, pinstripe suit with a silk tie, loosened at the collar. He holds a glass of amber whiskey, the condensation rendered in 8K detail. The camera uses a macro 100mm lens, focusing entirely on the eyes and the texture of the skin, blurring out the background patrons into abstract shapes. The mood is conspiratorial, sophisticated, and deeply atmospheric.

LangChain 只適用於原型設計

「LangChain 不適用於生產環境。」Kogo Tech Lab 的聯合創辦人Praveer Kochhar在2024年的Cypher會議上如此宣稱。他當時正回應一個關於使用LangChain優化基礎設施的問題。

KissanAI的創辦人Pratik Desai更進一步,他在X平台上寫道:「如果你的開發者建議在生產環境中使用LangChain,解僱他們。」這句話雖然大膽,但有多個理由說明為什麼沒有人願意將LangChain用於除原型設計以外的用途。

首要原因是LangChain過於複雜且不必要的抽象層。Ernst & Young Global Consulting Services的AI/ML實施經理Krystian Safjan提到,這些抽象層會導致混淆,特別是對於那些剛接觸LLMs或LangChain的人來說。

這種複雜性也使得將這個庫適應特定用途或與現有工具和腳本集成變得困難。一些開發者甚至稱其為炒作,並建議即使代碼設計正確,可能根本不需要像LangSmith這樣的工具。

複雜性和不穩定性
許多開發者報告稱LangChain有根本性的設計缺陷。一位在Reddit上的開發者表示,這個框架過於複雜且容易出錯。

「我費了很大力氣才讓文檔加載器的依賴項正常工作來解析文件夾中的PDF。結果一切都崩潰了。這是一團糟,簡直是個黑箱。我乾脆避開它。」他進一步補充道。

Octomind,一家軟件公司,發表了一篇詳細的博客文章,解釋為什麼他們放棄了使用LangChain。這個框架的靈活性不足,使得改進底層行為變得困難,而其有意的細節抽象阻礙了編寫底層代碼。

Octomind團隊發現,AI和LLMs的快速變化性使得LangChain難以設計出能經受時間考驗的抽象層。

顯然,LangChain通過在其他抽象層之上引入不必要的複雜性,使其難以理解和調試。

OSCR AI的聯合創辦人Angelina Y說,隨著時間的推移,越來越多人意識到像LangChain和LlamaIndex這樣的框架不適合生產。「實際上成為了萬能但無用的工具!當然,我必須說它們在製作原型方面非常出色,特別是LlamaIndex。」她進一步補充道。

即使是那些嘗試使用LangChain的開發者也發現其靈活性存在問題。一位Reddit用戶提到,他曾使用LangChain構建應用,但整體體驗令人沮喪,特別是在嘗試添加自定義功能時。他最終拆除了所有LangChain組件,並用原生的Python代碼替代它們。

「LangChain是一個學習LLM開發模式的好工具。」他補充道,進一步建議LangChain是一個不錯的選擇,但僅限於學習LLM開發而非擴展性。

開發者更喜歡使用LlamaIndex
LlamaIndex是一個更專注於搜索的替代方案,提供了一個簡單的界面來查詢LLMs並檢索相關文件。它更高效且使用更簡單,使其成為需要處理大量數據的應用的更佳選擇。

在考慮生產環境時,客戶更喜歡LlamaIndex。某位Reddit用戶提到,他的大多數生產客戶更喜歡LlamaIndex。「儘管我們目前僅支持LangChain,但我們看到了支持LlamaIndex的緊迫性。」他進一步補充道。

如果你正在構建一個需要靈活和可擴展的通用應用,那麼LangChain是一個不錯的選擇。
T-Systems的GenAI負責人Zahir Shaikh在他的LinkedIn帖子中提到,如果你正在構建一個需要高效和簡單的搜索和檢索應用,那麼LlamaIndex是更好的選擇。

編輯評論
這篇文章揭示了一個在技術界中常見的問題:過度設計和不必要的複雜性。LangChain的案例提醒我們,簡單和實用性往往勝過花哨但不實用的功能。在香港這個科技迅速發展的城市,開發者應該更加注重工具的實用性和適應性,而不是追逐潮流。LlamaIndex的成功例子表明,簡單的設計和高效的運行才是最終能夠在市場中立足的關鍵。這也提醒我們,在選擇技術方案時,應該更加注重實踐經驗和用戶反饋,而不是僅僅依賴於市場宣傳。

以上文章由特價GPT API KEY所翻譯

🎬 YouTube Premium 家庭 Plan成員一位 只需 HK$148/年

不用提供密碼、不用VPN、無需轉區
直接升級你的香港帳號 ➜ 即享 YouTube + YouTube Music 無廣告播放

立即升級 🔗

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *