Doubao (Chinese: 豆包) is an artificial intelligence assistant developed by ByteDance. == History == The chatbot was launched in August 2023. By November 2024, it had become China's most popular AI chatbot, with approximately 60 million monthly active users according to industry analytics. == Design == Doubao is powered by Volcano Engine (Volcengine), 120 trillion tokens consumed per day. == Variants == === Dola === The international version of Doubao is Dola which was launched in August 2023 as Cici. Dola is powered by OpenAI's GPT series of large language models and by Google's Gemini.
Google Gadgets
Google Gadgets are dynamic web content that can be embedded on a web page. They can be added to and interact strongly with Google's iGoogle personalized home page (discontinued in November 2013, although iGoogle Gadgets still work on other websites) and the Google Desktop (discontinued in September 2011) application, as well as Google Wave (also no longer supported by Google) and Google Sites. Webmasters can add and customize a gadget to their own business or personal web site, a process called "syndication". Gadgets are developed by Google and third-party developers using the Google Gadgets API, using basic web technologies such as XML and JavaScript. == Multi-user persistent - Wave Gadgets == With the advent of Google Wave (now Apache Wave), gadgets became able to have persistent storage and multi-user capabilities and better state management. Gadgets using Google Wave in this way were simply known as 'Wave Gadgets'. For instance, a game written using a Google Gadget could use Google Wave technology to record a list of users and high scores without having to worry about how to permanently store the scores on a hosted server. The use of Google Wave would give the gadget multi-user and permanent storage capabilities. For example, scores could be stored in a Google Wave hosted permanently by Google at no cost to the user. As of early 2013, Google Gadgets were deprecated in Google Spreadsheets. Shortly after, they were removed from all spreadsheets. == Technology == Google Gadgets are written in XML and can have HTML and JavaScript components, and were able to use Google Wave. Here is an example of a Hello World program written using Google Gadget technology. Google Gadgets API is a Google API which allows developers to create Google Gadgets easily.
Attempto Controlled English
Attempto Controlled English (ACE) is a controlled natural language, i.e. a subset of standard English with a restricted syntax and restricted semantics described by a small set of construction and interpretation rules. It has been under development at the University of Zurich since 1995. In 2013, ACE version 6.7 was announced. ACE can serve as knowledge representation, specification, and query language, and is intended for professionals who want to use formal notations and formal methods, but may not be familiar with them. Though ACE appears perfectly natural—it can be read and understood by any speaker of English—it is in fact a formal language. ACE and its related tools have been used in the fields of software specifications, theorem proving, proof assistants, text summaries, ontologies, rules, querying, medical documentation and planning. Here are some simple examples: Every woman is a human. A woman is a human. A man tries-on a new tie. If the tie pleases his wife then the man buys it. ACE construction rules require that each noun be introduced by a determiner (a, every, no, some, at least 5, ...). Regarding the list of examples above, ACE interpretation rules decide that (1) is interpreted as universally quantified, while (2) is interpreted as existentially quantified. Sentences like "Women are human" do not follow ACE syntax and are consequently not valid. Interpretation rules resolve the anaphoric references in (3): the tie and it of the second sentence refer to a new tie of the first sentence, while his and the man of the second sentence refer to a man of the first sentence. Thus an ACE text is a coherent entity of anaphorically linked sentences. The Attempto Parsing Engine (APE) translates ACE texts unambiguously into discourse representation structures (DRS) that use a variant of the language of first-order logic. A DRS can be further translated into other formal languages, for instance AceRules with various semantics, OWL, and SWRL. Translating an ACE text into (a fragment of) first-order logic allows users to reason about the text, for instance to verify, to validate, and to query it. == Overview == As an overview of the current version 6.6 of ACE this section: Briefly describes the vocabulary Gives an account of the syntax Summarises the handling of ambiguity Explains the processing of anaphoric references. === Vocabulary === The vocabulary of ACE comprises: Predefined function words (e.g. determiners, conjunctions) Predefined phrases (e.g. "it is false that ...", "it is possible that ...") Content words (e.g. nouns, verbs, adjectives, adverbs). === Grammar === The grammar of ACE defines and constrains the form and the meaning of ACE sentences and texts. ACE's grammar is expressed as a set of construction rules. The meaning of sentences is described as a small set of interpretation rules. A Troubleshooting Guide describes how to use ACE and how to avoid pitfalls. ==== ACE texts ==== An ACE text is a sequence of declarative sentences that can be anaphorically interrelated. Furthermore, ACE supports questions and commands. ==== Simple sentences ==== A simple sentence asserts that something is the case—a fact, an event, a state. The temperature is −2 °C. A customer inserts 2 cards. A card and a code are valid. Simple ACE sentences have the following general structure: subject + verb + complements + adjuncts Every sentence has a subject and a verb. Complements (direct and indirect objects) are necessary for transitive verbs (insert something) and ditransitive verbs (give something to somebody), whereas adjuncts (adverbs, prepositional phrases) are optional. All elements of a simple sentence can be elaborated upon to describe the situation in more detail. To further specify the nouns customer and card, we could add adjectives: A trusted customer inserts two valid cards. possessive nouns and of-prepositional phrases: John's customer inserts a card of Mary. or variables as appositions: John inserts a card A. Other modifications of nouns are possible through relative sentences: A customer who is trusted inserts a card that he owns. which are described below since they make a sentence composite. We can also detail the insertion event, e.g. by adding an adverb: A customer inserts some cards manually. or, equivalently: A customer manually inserts some cards. or, by adding prepositional phrases: A customer inserts some cards into a slot. We can combine all of these elaborations to arrive at: John's customer who is trusted inserts a valid card of Mary manually into a slot A. ==== Composite sentences ==== Composite sentences are recursively built from simpler sentences through coordination, subordination, quantification, and negation. Note that ACE composite sentences overlap with what linguists call compound sentences and complex sentences. ===== Coordination ===== Coordination by and is possible between sentences and between phrases of the same syntactic type. A customer inserts a card and the machine checks the code. There is a customer who inserts a card and who enters a code. A customer inserts a card and enters a code. An old and trusted customer enters a card and a code. Note that the coordination of the noun phrases a card and a code represents a plural object. Coordination by or is possible between sentences, verb phrases, and relative clauses. A customer inserts a card or the machine checks the code. A customer inserts a card or enters a code. A customer owns a card that is invalid or that is damaged. Coordination by and and or is governed by the standard binding order of logic, i.e. and binds stronger than or. Commas can be used to override the standard binding order. Thus the sentence: A customer inserts a VisaCard or inserts a MasterCard, and inserts a code. means that the customer inserts a VisaCard and a code, or alternatively a MasterCard and a code. ===== Subordination ===== There are four constructs of subordination: relative sentences, if-then sentences, modality, and sentence subordination. Relative sentences starting with who, which, and that allow to add detail to nouns: A customer who is trusted inserts a card that he owns. With the help of if-then sentences we can specify conditional or hypothetical situations: If a card is valid then a customer inserts it. Note the anaphoric reference via the pronoun it in the then-part to the noun phrase a card in the if-part. Modality allows us to express possibility and necessity: A trusted customer can/must insert a card. It is possible/necessary that a trusted customer inserts a card. Sentence subordination comes in various forms: It is true/false that a customer inserts a card. It is not provable that a customer inserts a card. A clerk believes that a customer inserts a card. ===== Quantification ===== Quantification allows us to speak about all objects of a certain class (universal quantification), or to denote explicitly the existence of at least one object of this class (existential quantification). The textual occurrence of a universal or existential quantifier opens its scope that extends to the end of the sentence, or in coordinations to the end of the respective coordinated sentence. To express that all involved customers insert cards we can write Every customer inserts a card. This sentence means that each customer inserts a card that may, or may not, be the same as the one inserted by another customer. To specify that all customers insert the same card—however unrealistic that situation seems—we can write: A card is inserted by every customer. or, equivalently: There is a card that every customer inserts. To state that every card is inserted by a customer we write: Every card is inserted by a customer. or, somewhat indirectly: For every card there is a customer who inserts it. ===== Negation ===== Negation allows us to express that something is not the case: A customer does not insert a card. A card is not valid. To negate something for all objects of a certain class one uses no: No customer inserts more than 2 cards. or, there is no: There is no customer who inserts a card. To negate a complete statement one uses sentence negation: It is false that a customer inserts a card. These forms of negation are logical negations, i.e. they state that something is provably not the case. Negation as failure states that a state of affairs cannot be proved, i.e. there is no information whether the state of affairs is the case or not. It is not provable that a customer inserts a card. ==== Queries ==== ACE supports two forms of queries: yes/no-queries and wh-queries. Yes/no-queries ask for the existence or non-existence of a specified situation. If we specified: A customer inserts a card. then we can ask: Does a customer insert a card? to get a positive answer. Note that interrogative sentences always end with a question mark. With the help of wh-queries, i.e. queries with query words, we can interrogate a text for details of the specified situation. If we specified: A
Retrieval-augmented generation
Retrieval-augmented generation (RAG) is a technique that enables large language models (LLMs) to retrieve and incorporate new information from external data sources. With RAG, LLMs first refer to a specified set of documents, then respond to user queries. These documents supplement information from the LLM's pre-existing training data. This allows LLMs to use domain-specific and/or updated information that is not available in the training data. For example, this enables LLM-based chatbots to access internal company data or generate responses based on authoritative sources. RAG improves LLMs by incorporating information retrieval before generating responses. Unlike LLMs that rely on static training data, RAG pulls relevant text from databases, uploaded documents, or web sources. According to Ars Technica, "RAG is a way of improving LLM performance, in essence by blending the LLM process with a web search or other document look-up process to help LLMs stick to the facts." This method helps reduce AI hallucinations, which have caused chatbots to describe policies that don't exist, or recommend nonexistent legal cases to lawyers that are looking for citations to support their arguments. RAG also reduces the need to retrain LLMs with new data, saving on computational and financial costs. Beyond efficiency gains, RAG also allows LLMs to include sources in their responses, so users can verify the cited sources. This provides greater transparency, as users can cross-check retrieved content to ensure accuracy and relevance. The term retrieval-augmented generation (RAG) was introduced in a 2020 paper that described combining a parametric language model with a non-parametric external memory accessed through retrieval at inference time. == RAG and LLM limitations == LLMs can provide incorrect information. For example, when Google first demonstrated its LLM tool "Google Bard" (later re-branded to Gemini), the LLM provided incorrect information about the James Webb Space Telescope. This error contributed to a $100 billion decline in Google's stock value. RAG is used to prevent these errors, but it does not solve all the problems. For example, LLMs can generate misinformation even when pulling from factually correct sources if they misinterpret the context. MIT Technology Review gives the example of an AI-generated response stating, "The United States has had one Muslim president, Barack Hussein Obama." The model retrieved this from an academic book rhetorically titled Barack Hussein Obama: America's First Muslim President? The LLM did not "know" or "understand" the context of the title, generating a false statement. LLMs with RAG are programmed to prioritize new information. This technique has been called "prompt stuffing." Without prompt stuffing, the LLM's input is generated by a user; with prompt stuffing, additional relevant context is added to this input to guide the model's response. This approach provides the LLM with key information early in the prompt, encouraging it to prioritize the supplied data over pre-existing training knowledge. == Process == Retrieval-augmented generation (RAG) enhances large language models (LLMs) by incorporating an information-retrieval mechanism that allows models to access and utilize additional data beyond their original training set. Ars Technica notes that "when new information becomes available, rather than having to retrain the model, all that's needed is to augment the model's external knowledge base with the updated information" ("augmentation"). IBM states that "in the generative phase, the LLM draws from the augmented prompt and its internal representation of its training data to synthesize" an answer. === RAG key stages === Typically, the data to be referenced is converted into LLM embeddings, numerical representations in the form of a large vector space. RAG can be used on unstructured (usually text), semi-structured, or structured data (for example knowledge graphs). These embeddings are then stored in a vector database to allow for document retrieval. Given a user query, a document retriever is first called to select the most relevant documents that will be used to augment the query. This comparison can be done using a variety of methods, which depend in part on the type of indexing used. The model feeds this relevant retrieved information into the LLM via prompt engineering of the user's original query. Newer implementations (as of 2023) can also incorporate specific augmentation modules with abilities such as expanding queries into multiple domains and using memory and self-improvement to learn from previous retrievals. Finally, the LLM can generate output based on both the query and the retrieved documents. Some models incorporate extra steps to improve output, such as the re-ranking of retrieved information, context selection, and fine-tuning. == Applications == Retrieval-augmented generation is used in applications where generated responses need to be grounded in external or frequently updated information. Commonly cited use cases include search engines, question-answering systems, customer support chatbots, enterprise knowledge assistants, content generation, recommendation systems, retail and e-commerce, and industrial or manufacturing workflows. In healthcare, RAG has been studied as a way to ground large language model outputs in external medical knowledge sources, although reviews have noted continuing challenges around evaluation, ethics, and clinical reliability. == Improvements == Improvements to the basic process above can be applied at different stages in the RAG flow. === Encoder === These methods focus on the encoding of text as either dense or sparse vectors. Sparse vectors, which encode the identity of a word, are typically dictionary-length and contain mostly zeros. Dense vectors, which encode meaning, are more compact and contain fewer zeros. Various enhancements can improve the way similarities are calculated in the vector stores (databases). Performance improves by optimizing how vector similarities are calculated. Dot products enhance similarity scoring, while approximate nearest neighbor (ANN) searches improve retrieval efficiency over K-nearest neighbors (KNN) searches. Accuracy may be improved with Late Interactions, which allow the system to compare words more precisely after retrieval. This helps refine document ranking and improve search relevance. Hybrid vector approaches may be used to combine dense vector representations with sparse one-hot vectors, taking advantage of the computational efficiency of sparse dot products over dense vector operations. Other retrieval techniques focus on improving accuracy by refining how documents are selected. Some retrieval methods combine sparse representations, such as SPLADE, with query expansion strategies to improve search accuracy and recall. === Retriever-centric methods === These methods aim to enhance the quality of document retrieval in vector databases: Pre-training the retriever using the Inverse Cloze Task (ICT), a technique that helps the model learn retrieval patterns by predicting masked text within documents. Supervised retriever optimization aligns retrieval probabilities with the generator model's likelihood distribution. This involves retrieving the top-k vectors for a given prompt, scoring the generated response's perplexity, and minimizing KL divergence between the retriever's selections and the model's likelihoods to refine retrieval. Reranking techniques can refine retriever performance by prioritizing the most relevant retrieved documents during training. === Language model === By redesigning the language model with the retriever in mind, a 25-time smaller network can get comparable perplexity as its much larger counterparts. Because it is trained from scratch, this method (Retro) incurs the high cost of training runs that the original RAG scheme avoided. The hypothesis is that by giving domain knowledge during training, Retro needs less focus on the domain and can devote its smaller weight resources only to language semantics. The redesigned language model is shown here. It has been reported that Retro is not reproducible, so modifications were made to make it so. The more reproducible version is called Retro++ and includes in-context RAG. === Chunking === Chunking involves various strategies for breaking up the data into vectors so the retriever can find details in it. Three types of chunking strategies are: Fixed length with overlap. This is fast and easy. Overlapping consecutive chunks helps to maintain semantic context across chunks. Syntax-based chunks can break the document up into sentences. Libraries such as spaCy or NLTK can also help. File format-based chunking. Certain file types have natural chunks built in, and it's best to respect them. For example, code files are best chunked and vectorized as whole functions or classes. HTML files should leave