惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
The Cloudflare Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
F
Fortinet All Blogs
J
Java Code Geeks
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
小众软件
小众软件
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

Tong-H

about fitness [ Tong-H ] 自媒体 [ Tong-H ] OpenClaw + 即梦自动运营小红书 [ Tong-H ] 202512 [ Tong-H ] nonsense [ Tong-H ] 基于 Playwright 的开发辅助工具-dev-playkit [ Tong-H ] 202509-202511 [ Tong-H ] CAT-TV [ Tong-H ] 202508/09 [ Tong-H ] AI 实践-DeepWiki-open 为项目生成 wiki 文档 [ Tong-H ] ai 实践-项目迁移 [ Tong-H ] 在富文本编辑器中处理图文资源 [ Tong-H ] 2025-07 [ Tong-H ] how to stew meat [ Tong-H ] AI 实践-Memory Bank [ Tong-H ] Maxillofacial fracture [ Tong-H ] 2025-06/07 [ Tong-H ] some day [ Tong-H ] day [ Tong-H ] 升级老项目的包依赖 [ Tong-H ] 2025-05 [ Tong-H ] 2025-04 [ Tong-H ] 2025-03 [ Tong-H ]
ai [ Tong-H ]
2025-06-01 · via Tong-H

claude code

  • error: country is not support , and i use US vpn node with global model

  • try disable ipv6, some vpn only proxy ipv4. not work

    1
    2
    3
    4

    sudo networksetup -setv6off "Wi-Fi"

    sudo networksetup -setv6automatic "Wi-Fi"
  • vpn proxy doesn’t system-wide covering

    1
    2
    3
    4
    5
    6

    lsof -iTCP -sTCP:LISTEN -nP | grep -E 'v2ray|clash|qv2ray'
    curl -x socks5h://127.0.0.1:1080 https://ipinfo.io

    sudo networksetup -setsocksfirewallproxy "Wi-Fi" 127.0.0.1 1080
    sudo networksetup -setsocksfirewallproxystate "Wi-Fi" on

MCP-ModelContextProtocol

  • allows AI models to access and utilize external resources—such as databases, APIs, and local files—without the need for custom integrations for each data source.

  • it’s particularly beneficial in scenarios where AI models need to interact with multiple data sources or tools.

  • concepts

    • MCP host, an application that integrates ai modules, like cursor
    • MCP client, It functions as a plugin within the host, providing a bridge between the host and the server
    • MCP server, an external server that offers data
    • Tools allow modules take actions through your server
    • Resources provide data to modules, not yet supported in Cursor
      • static resources are equal to upload file, but the file can be dynamic
    • Prompts create a message template, or a message workflow
  • claude desktop failed to run mcp servers, but these servers are work great with cursor

  • the official documents and some articles may not follow the updating of Sdk

  • debugger

    • npx @modelcontextprotocol/inspector
    • with claude: Open DevTools: Command-Option-Shift-i
  • The tokenization process splits text into smaller units called tokens, usually using a sub-word tokenization technique like Byte Pair Encoding (BPE) or WordPiece. but non-Latin text will be treated differently. Except the obvious characters, additional splits and encoding for sub-word components, punctuation, or any special tokens may exits and various according to the tokenization strategy

  • useful for inspecting dom and adjusting style

    • Q: get the selected element. it’s child element has a padding thus is used to make a gap between two elements. the gap is need when the two elements are aligned.

  • get network logs and console logs

    • Q: getnetwork. log the requests with pageSize:20 set

    • this feature is not work as expected, it’s tend to miss logs. the repo are still many unresolved issues related to log retrieval
    • sometimes, wiping logs or closing other F12 panels can help

RAG-RetrievalAugmentedGeneration

  • combines traditional information retrieval with generative models.
  • allowing the model to retrieve relevant information from an external knowledge base (like a document store or search engine) before generating an answer.
    When a query (input) is received:
    Before-retrieval
      Routing
      rewriting
      expansion 
    
    Retrieval
    After-retrieval
    Rerank
    summary
    fusion

Use LangChain and Ollama to go through the RAG workflow

https://js.langchain.com/docs/tutorials/rag

  • Indexing, a pipeline for ingesting data

    • load, load document via document_loaders
    • split, split doc into chunks via text splitters that support four strategies. long documents will be hard to fit into the context window of many models and can be struggle for modules to find information in very long inputs
      • length
      • text-structure, based on paragraphs, sentences, and words
      • document-structure, based on an inherent structure, e.g. HTML, Markdown, or JSON
      • semantic-meaning
    • embed, Wrapper around a text embedding model for converting text to embeddings
    • store, store splits into a VectorStore, allowed to add text and Document objects to the store, and query them using various similarity metrics.
      • Can be in-memory or via third party
      • allow to connect to an existing vector store
      • similaritySearch, similaritySearchWithScore
    • asRetriever, generate a Retriever, specifically a VectorStoreRetriever
      • Retrievers are Runnables, implement a standard set of methods (invoke and batch operations)
      • similaritySearch vs Retriever
  • Retrieval, takes a user query at run time and retrieves the relevant data from the store via retrievers

    • Query analysis
      • can Re-write or expand to improve semantic or lexical searches
      • can translate natural language queries into specialized query languages or filters, like sql, cypher
  • generation, passes the relevant data and question to the model

    • allow to load prompt template from prompt hub

task-master

  • upon on Claude ai(required), Perplexity AI(optional)
  • despite Claude ai, it still can manage tasks manually—creating, editing, and tracking them in tasks.json or via the Task Master CLI/MCP tools.
    • Perplexity AI
      • a search engine powered by models like Claude, GPT, and its own fine-tuning
      • fact-based, best for research (cited answers)
      • Always up-to-date
      • Less conversational
    • Claude
      • more safety and polite.
        • unlike open ai which relying on human feedback to fix bad behavior, Anthropic usesConstitutional AI that includes a set of human principles.
        • sometimes too verbose or cautions
      • best for long document analysis, can handle over 100k tokens and optimized for huge inputs
  • Init
    • use parse_prd to analyze PRD document, and create tasks 
    • a foundational task structure will be created, and used for later tracing
  • update
    • analyze what changed in the PRD and update / add / cancel tasks
    • changes on code need manually implementations
  • tips for better maintenance
    • useanalyze-complexity, based upon Perplexity AI
      • to get to know task complexity level
      • it’s better to break down complex tasks with expand
    • Periodically validate and fix invalid or circular dependencies.