Introducing FutureAI’s Masterpiece Architecture: Build AI-native Applications Leveraging Generative Personalization

Community Article Published November 1, 2024

Introduction

FutureAI is introducing Masterpiece, a state-of-the-art architecture to build AI-native applications with generative personalization out-of-the-box. As a developer building on top of Masterpiece, you get access to Masterpiece’s user inference graphs for generative personalization which include user interests, user relationships, user persona, user preferences and user knowledge, all within FutureAI’s own privately-hosted architecture.

Masterpiece is built utilizing a contextualization specialized version of Llama 70B, Leo 1 and incorporates an LDA model for topic modeling which has been trained on hundreds of thousands of emails. We’ve added Vertex AI’s multimodal embedding library to Masterpiece’s architecture, and two datasets to choose from for inference starting with Gmail and Plaid.

Masterpiece enables sovereignty of user data and provides controls, consents and privacy choices for users with their data. Each user is able to craft a specific prompt for which of their data they do not want to use for their generative personalization and when building their inference graphs.

We’ve built all of this and an easy way to build your app with generative personalization utilizing FutureAI’s SDK starting today.

Masterpiece’s generative personalization & inference graphs

At the core of Masterpiece is the ability to build your application with Generative Personalization utilizing Masterpiece’s Inference Graphs. We are launching five inference graphs including users’ Interests, Relationships, Knowledge, Personas, and Preferences.

  1. Interests: This inference graph within Masterpiece provides you with the ability to pull the interests of a specific user. You can pull these interests mutually exclusive of any other dataset if you are building a new application, or,if you have an existing dataset,Leo 1 can provide the most relevant interests of the user paired for your dataset.|

    • Interests without another dataset: For example, if you are building a new networking application that is an interests-based network, you can pull all interests for each user and populate your application with users by interests. Masterpiece will provide interests for each specific user based on relevance for each user, too.

    • Interests paired with another dataset: For example, if you are an ecommerce company or a news publication with an existing dataset, Leo 1 will return which of your dataset is relevant to the user, with a contextualized summary. If a user is discussing their trip to Yosemite with their 10-month-old puppy, Masterpiece will return the data within your dataset that is relevant to trips to Yosemite and 10-month-old puppies, whether it is products or the articles from your publication.

  2. Relationships: This inference graph within Masterpiece provides you with the ability to pull the relationships of a specific user. You can pull these relationships from mutually exclusive interests or pair it with an interest graph for a deeper level of inference.

  3. Relationships not paired with interests: For a specific user, you can pull from all of their conversations the relationship taxonomy and the person’s full name. So if you want to populate your application with a specific dataset for a user’s first-time login you are able to now populate it with which specific user the user should invite to the application to create an exponential growth level.

    For example, you are able to pull:

    • Father: John Appleseed
    • Colleague: Jane Applegrove
    • Best Friend: James Appletree.
  4. Relationships paired with interests: For a specific user you can pull the relationship taxonomy and what interest this relationship is paired with for a specific user. If you want to populate your interests-based social network with interests and users, you can use this end-point for that.

    For example, for a specific user you could pull:

    Interest: Hiking Trip to Yosemite for Thanksgiving

      - Relationships for this interest   
         1. Father John Appleseed  
         2. Colleague Jane Applegrove  
         3. Best Friend James Appletree.
    

    On top of this, when more users sign-in with FutureAI,you can pull different users of the same interest and have Masterpiece calculate a strength score to quantify the strength of a user’s relationships. The strength score that Masterpiece provides is built on a statistical model of:

          1. Recency of conversation between users  
          2. Frequency of conversation between users  
          3. Longevity of conversation between users
    
  5. Knowledge: FutureAI’s knowledge graph extracts what a specific user is knowledgeable in. This knowledge graph is built on the thousands of conversations from the user’s data and clusterized, revealing the depth of a specific user’s knowledge for a specific subject matter.

    • Knowledge graph standalone: You can pull from Masterpiece the knowledge of a specific user and it will provide you with the largest clusters that Masterpiece believes a user is more than average in being knowledgeable.
  6. Persona: FutureAI’s persona graph can be used to power a conversation for a specific user utilizing FutureAI’s Leo 1 model, and mimics the tonality and linguistic style of the user. This is especially useful if you want to build an application where users have AIs speak for them. For example, this can be used by professors to communicate via AI with their students. The AI would respond in the professor’s tone and linguistic style. The persona graph can be used alone or in conjunction with the knowledge graph.

These are the different elements that Masterpiece takes into consideration for building each user’s persona graph:

  Writing Style Analysis
  
     1. Tracking patterns in sentence construction  
     2. Identifying vocabulary preferences  
     3. Mapping formality levels across different recipients  
     4. Noting time-based writing pattern changes

  Emotional Tone Mapping

     1. Measuring baseline emotional states  
     2. Identifying triggers for tone shifts  
     3. Tracking recipient-specific tone adjustments  
     4. Noting contextual tone variations

Persona graph without knowledge graph: You are able to pull the persona graph standalone to know a user’s persona. When pulled, Masterpiece will provide you with the user’s tonality attributes, their linguistic style and an example message.

  Here are a few examples of the personas you can pull for users: 

  Formal Professional

        1. Tonality Attributes Measured, authoritative, solution-focused.  
        2. Tonality Summary This persona combines measured tonality with structured language.  
        3. Linguistic Style Complex structures, business terminology, formal grammar.  
        4. Example message "I've reviewed the quarterly projections and identified several areas for potential optimization. Shall we schedule a meeting to discuss implementation strategies?"

  Creative Enthusiast

        1. Tonality Attributes High energy, imaginative, emotionally open.  
        2. Tonality Summary Merges emotional expression with colorful language.  
        3. Linguistic Style Metaphors, vivid descriptors, artistic vocabulary.  
           Example message "I'm absolutely buzzing with ideas for this project\! Picture this: we create a stunning visual journey that takes viewers through an ocean of possibilities\! 💫"

  Technical Expert

        1. Tonality Attributes Precise, analytical, fact-based.  
        2. Tonality Summary Pairs analytical precision with specialized vocabulary.  
        3. Linguistic Style Technical vocabulary, data references, structured explanations.  
        4. Example message "The system latency decreased by 23.4% after implementing the new caching algorithm. Key performance indicators show significant improvement across all metrics."  
              
  Casual Communicator 

        1. Tonality Attributes Relaxed, friendly, approachable.  
        2. Tonality Summary Combines informal tone with relaxed language patterns.  
        3. Linguistic Style Abbreviated words, informal punctuation, emojis.  
        4. Linguistic Style "Hey! Just checked out that new feature - pretty cool stuff! Btw, any chance we can chat about it tmrw? 😊"

Persona graph paired knowledge graph For example, you are able to pair the persona graph and the knowledge graph and build an application that answers for a specific user in their persona style with their specific knowledge.
  1. Preferences: The preferences graph of a user provides you with the ability to pull the modality preferences of a specific user. For example if you wanted to pull for a specific user the modality (text, image or video) users engaged most with and their language, you can pull it using the preferences graph from Masterpiece.

    Preferences examples:

    1. Jane Applegrove

      • Primary engagement modality: Text
      • Primary engagement language: Korean
      • Primary engagement language script: Hangul
        Rule: Use formal Korean (-습니다) style
    2. John Appleseed

      • Primary engagement modality: Video
      • Primary engagement language: Italian
        Rule: Use conversation style

Quick start guide to building with Masterpiece

import { Future } from '@future-sdk/future-js';
import { useEffect, useState, useRef } from 'react';
const Page = () => {
  const [isSuccess, setIsSuccess] = useState(false);
  const [options, setOptions] = useState<OptionData[]>([]);
  const [generativeResultsLoaded, setGenerativeResultsLoaded] = useState(false)
  const sessionStartedRef = useRef(false); // Ref to keep track of session state

  useEffect(() => {
    if (sessionStartedRef.current) return; // Prevent multiple session starts
    sessionStartedRef.current = true;

    try {
      Future.startFutureSession({
        apiKey: import.meta.env.PUBLIC_ENV__API_KEY,
        iframeUrl: import.meta.env.PUBLIC_ENV__IFRAME_SERVER_ROOT,
        websocketUrl: import.meta.env.PUBLIC_ENV__WEBSOCKET_ROOT,
        serverUrl: import.meta.env.PUBLIC_ENV__SERVER_ROOT,
        onSessionUpdate: (session: any) => {
          if (session.lastEventName === 'LinkedAccountCreated') {
            setIsSuccess(true);
          }
          if (session.lastEventName === 'UserGenerativeResults') {
            setGenerativeResultsLoaded(true);
            const categories = session?.results.map(
              (category: string, index: any) => {
                return {
                  id: index,
                  label: category,
                  isSelected: false,
                };
              },
            );
            setOptions(categories);
          }
        },
        onError: (errorEvent: CustomEvent<any>) => {
          console.error(
            `error from onError: ${JSON.stringify(errorEvent.detail)}`,
          );
        },
      });

      Future.createFutureButton({
        container: '.future-button',
        merchantFlowId: `${import.meta.env.PUBLIC_ENV__FLOW_ID}`,
      });
    } catch (e) {
      console.error(e);
    }
  }, []);

  return (
    <Flex direction="column" justifyContent={'space-between'} height={'100vh'}>
      {!isSuccess && <Banner />}
      {isSuccess && !generativeResultsLoaded && (
        <Loading/>
      )}
      {isSuccess && generativeResultsLoaded && (
        <Results description={resultsText} options={options} />
      )}
    </Flex>
  );
};

export { Page };

More Resources

  1. 📑 FutureAI Developer Documentation
  2. 🤝 Interactive with FutureAI developers on Discord.
  3. 📧 Email us at developers [at] futureai.com
  4. Follow us on X.

Technical Specifications

Core Specifications:
- Base Model: Leo 1 (Fine-tuned Llama 3.1 70B)
- Response Time: 5,000ms (p95)
- Infrastructure: NVIDIA H100s
- SDK Support: JavaScript, TypeScript
- Data Sources: Gmail, Plaid

Rate Limits:
- API Calls: 100 requests/minute/key
- Concurrent Connections: 25 per client
- Burst Limit: 200 requests/minute

Security & Privacy

Building trust with users is critical. FutureAI has implemented state-of-the-art privacy and security within every layer of Masterpiece, from user and developer data ingestion to model inference in our private architecture.

We believe in over-communicating how data will be used and shared. Within our Just-in-Time User Consent Authorization Modal, we communicate why users need to share their data with FutureAI, how FutureAI stores user data, the duration each user’s data is stored for, and how users can request deletion of their data.

This onboarding for each user is important and we always request their explicit consent when they are signing in with FutureAI. We do this so they know exactly what data they are sharing with FutureAI, and what data from Masterpiece’s inference graphs the developer is requesting.

FutureAI’s SDK enables you to prompt users with a Sign in with FutureAI button in the component library we’ve built for developers to easily allow users to connect their data. In this step users authenticate their dataset to FutureAI, and provide the explicit consent to share their data for FutureAI to build their generative personalization for you.

Pricing

To start building with Masterpiece, you can Pay Per MTok. For FutureAI enterprise tiers, please contact enterprise [at] futureai.com

Component Component Price
Input MTok $19/MTok
Output MTok $75/MTok

Support & Resources

Join our Discord community and follow us on Twitter: @Futureaiglobal.

Thank you

A big thank you to Lee Hnetinka, Toshe Boshkovski, Egor Kolpakov for architecting and instantiating Masterpiece’s implementation in the last few months. We’re grateful too for the support from our investors PivotNorth Capital, Village Global, and Jay McGraw, our advisor for privacy and security Anthony Belfiore, and our partner Google.

Start building with Masterpiece today at Futureai.com. If you have any questions or want to schedule time with us to chat, please contact Bob Christie at bob [at] futureai.com.