text:
\section{Introduction}

Behaviour support technology is being developed to perform tasks on our behalf or to guide our actions. In the area of health and well-being for example, there are support agents that remind us to take our medicine \cite{milic2016health}, to help us eat healthier \cite{schoffman2013mobile}, and to coach us on well-being \cite{wabeke2014recommending}.
To be most effective, these agents should support us in a flexible and personalised way \cite{van2015creating}.
For example, they need to understand what the user finds important (i.e., user's values), take into account the context they are in, and know how the user's ideal choices and actions are affected by these factors.

Furthermore, as behaviour support systems are increasingly deployed in the real world over a long period of time \cite{van2019take}, it is inevitable that as time passes, there will be situations where the provided support does not fully match the user's ideal choices or needs. We refer to this as `misalignment', which will be defined and explained in more detail in \autoref{sec:AD}. In this paper, we focus on addressing these misalignment situations with the ultimate goal to achieve alignment -- that is, a situation where support agents provide support that is in line with what users need or want.

This is related to the notion of AI alignment, which can be defined as a situation where AI is trying to do what we want it to do \cite{christiano2018clarifying}.
Russell \cite{russell2019human} proposes to achieve AI alignment by building  AI systems that learn and promote human values so that they do not pose a threat to us. One such approach to the AI alignment problem is to use inverse reinforcement learning (see, e.g., \cite{herman2016inverse, hadfield2016cooperative}). Inverse reinforcement learning, unlike standard reinforcement learning, does not have a predefined reward function that the agent needs to maximize. Instead, its focus is on the process of inferring a reward function from observed behaviour \cite{ng2000algorithms}. Inverse reinforcement learning, among other data-driven approaches, largely depends on behavioural data.

While these are worthwhile frameworks, data-driven approaches have their limitations. First, the existing data only reflects past or current user behaviour. It does not account for desired future behaviour that the user is not yet doing.
In addition, data-driven approaches can lack transparency because of the complex relation between input data and a model's output \cite{dignum2017responsible}. This makes it difficult for users to understand how the system works and also to adapt the system to their preferences. Moreover, \citet{sax2021optimization} argues that the data-driven techniques used to personalize interventions run a risk of being manipulative, because the same techniques can be misused to steer the users' behaviours to make them serve the health app providers' ends.

To overcome these problems, we propose to approach AI alignment in the context of support agents with a direct conversation between user and agent. We refer to this as an `AI Alignment Dialogue', or `Alignment Dialogue', for short: a dialogue where the user and the support agent talk about the situation and how to solve it together to achieve and maintain AI alignment. Having an AI alignment dialogue allows the users to directly convey higher-level concepts to the agent, such as their values, goals, or wishes. These high-level concepts can be difficult to learn from the data \cite{armstrong2018occam}.
In addition, when the user converses with the agent, the agent could give insight into how it works or why it gives the advice using the same high-level concepts. These high-level concepts may be easier to understand for the user than the lower-level features on which behavioural data-driven approaches work. These aspects together could make the agent more transparent and trusted.
Moreover, we may mitigate the risk
of manipulative agents with alignment dialogues. One of the elements of manipulation is that it is done through infiltrating the user's decision-making process rather than by engaging with them in a straightforward manner \cite{sax2021optimization}. A direct conversation such as an alignment dialogue could find the balance between how much information is asked of the user and how much they are willing to give.
Another motivation for the use of alignment dialogues is that the agent may not always have full knowledge of the user's situation and wishes, for example if a user decides they want to change their exercise schedule.
Via a dialogue we can have the user in the loop to create the required understanding. By doing this, we aim to create an AI which is responsible: humans and machines work together in a way that is beneficial for the user and allows them to shape their lives in accordance to what they find important.

To the best of our knowledge, this is the first proposal for approaching the AI alignment problem via a dialogue. We take a different but important point of view of alignment and venture into how alignment dialogues might go beyond the learning of assumed ``preferences'' to reach goals, values, aspirations, and the like. In this paper, we aim to conceptualize the notion of AI alignment dialogues and investigate end-users' opinions and expectations for such a dialogue when interacting with the agent. Since the notion of AI alignment dialogue is novel, in this paper we focus on fundamental problems, such as what  do we mean with an AI alignment dialogue, what should it look like, and how does it affect human-agent interaction?
Specifically, in this paper we address the following research questions:

\begin{enumerate}[label=(RQ\arabic*)]
    \item Which types of misalignment can occur between support agents and their users?
    \item How would end users want to talk about an occurring misalignment with the support agent?
\end{enumerate}

The rest of this paper is structured as follows.
We provide an overview of related work in \autoref{sec:related}. In \autoref{sec:AD} we explain and elaborate on the concept of (mis)alignment and the structure of AI alignment dialogues. To study people's opinions on  alignment dialogues, we conducted a qualitative user study where we presented participants with misalignment situations and corresponding alignment dialogues in different scenarios (\autoref{sec:study}). The results are presented in \autoref{sec:results}, from which we distill several design suggestions and considerations that could help shape such dialogues (\autoref{sec:guidelines}). \autoref{sec:connect} illustrates how components of our alignment dialogue framework could be connected. In \autoref{sec:discussion}, we discuss our key findings and future work.

\section{Related Work}
\label{sec:related}
The central topic of this paper is AI alignment dialogues, through which we aim to realize supportive technologies that can provide support that is aligned with the user's needs. This section provides an overview of related work on relevant topics, namely the AI alignment problem, alignment in dialogue systems, and models for behaviour support agents.

\subsection{Alignment Problem}
\label{sec:alignmentproblem}

\subsubsection{AI Alignment}
\label{sec:aialignment}
The alignment problem in the context of AI refers to the challenge of aligning AI with human values so that it does not pose a threat people and society \cite{russell2015research,russell2019human,nick2014superintelligence}. The authors of the IEEE Global Initiative on Ethics of Autonomous and Intelligent Systems \cite{ieee2019initiative} propose that autonomous systems should "always be subordinate to human judgment and control. If machines engage in human communities as autonomous agents, then those agents will be expected to follow the community's social and moral norms."
These researchers advocate that AI agents that are well-aligned with human values and preferences could bring immense benefits to humanity. In these frameworks, the AI alignment problem is discussed from an ethical perspective, focusing on how to ensure AI is properly aligned with societal values. It is assumed that the community norms and social norms are made explicit, or can be learned from human behaviour, as \citet{russell2019human} proposes.

\citet{butlin2021ai}, however, identifies two complications for data-driven approaches to learn values: one major complication is that each individual has different values. A second complication is that humans can be irrational, which makes it considerably more difficult to infer our values from our behaviours. His propositions highlight two types of challenges regarding value-related conflicts.

First, if AI should never be in conflict with human values, it needs to be identified whose values this concerns, since different people may ascribe to different moral systems. \citet{butlin2021ai} addresses this by proposing that AI needs to be augmented with a theory describing how different people's values should be balanced and prioritised. \citet{gabriel2020artificial} addresses the question in a different way and argues that ``the central challenge is not to identify the true moral theory and encode it in machines, but rather to identify fair processes for determining which values to encode."

The second aspect of dealing with value conflicts lies in people's irrationality, i.e., that we do not always act according to our values. This means that our behaviour is not necessarily a good source for determining the goal of alignment, and other goals may be considered as \citet{gabriel2020artificial} argues: should AI be aligned with \textit{instructions} (the agent does what I instruct it to do), \textit{intentions} (the agent does what I intend it to do), \textit{preferences} (the agent does what my behaviour reveals I prefer), \textit{interest/well-being} (the agent does what is best for me), or \textit{values} (the agent does what it morally ought to do, defined by the individual or society)?

In our research we are interested in how a personal agent's support can be aligned with the user's needs and motivational attitudes such as goals and values. Consequently, our focus is on \emph{individual} alignment and \emph{personal} values, rather than alignment with general societal values. In this way the normative questions shift from what societal values should be encoded in artificial agents to \emph{how} we can come to understand what the individual's values are. Thus it is not the goal of this work to address the moral question of what is the morally ``right'' way to act for the user and to provide the ``right'' support in that sense; rather, we focus on what the user tells the agent they want or need. These user needs could correspond to several of the goals of alignment as proposed by  \citet{gabriel2020artificial}.

Our work starts from a different perspective than \citet{russell2019human}'s proposal about learning what humans value from human behaviour, in the sense that we take an \emph{interactive} approach. In our approach, it is the direct conversation with the human that is the primary and ultimate source of information about humans' preferences and values. This is because these high-level concepts are difficult to learn from user behaviour, especially when the goal is to \emph{change} behaviour: in that case we are interested in desired future behaviour rather than the user's current behaviour.

In our context, \emph{conflicts} may occur when a human's current desires conflict with their \emph{long-term goals or values}. This kind of conflict is one of the reasons why support agents may be beneficial, since the agent can help the user adhere to their values despite current desires to do otherwise. Alignment dialogues can have advantages in this kind of situation as they provide the opportunity for the agent and the user to assess the situation together and decide how to balance short and long term needs and desires.

\subsubsection{Shared Mental Models}
The AI alignment problem has connections with the concept of shared mental models. If AI has mental models of human values and preference, its action can align accordingly. Shared mental model theory was developed to explain and describe human team performance. \citet{converse1993shared} defined shared mental models as ``knowledge structures held by members of a team that enable them to form accurate explanations and expectations for the task, and, in turn, coordinate their actions and adapt their behaviour to demands of the task and other team members.''
The basic idea is that mental model sharedness -- defined   as ``overlapping mental representations by team members that reflect how the group members as a collectivity think or characterize phenomena'' \cite{klimoski1994team} -- improves team performance (see, e.g. \cite{mathieu2000influence,van2011team,westli2010teamwork}).

Shared mental model theory has been translated to the context of (human-)agent teams, arguing that sharedness is also important when artificial agents are involved \cite{jonker2011shared}. Sharedness of the mental model that the agent has of the user's goals, and the user's own mental model of their goals, can improve the agent's support and alignment with the user's needs. Since the agent cannot directly inspect the content of the user's mental model, AI alignment dialogues can be a way to elicit the relevant information and update its user model.

\subsection{Alignment in Dialogue Systems}
This paper proposes to approach the AI alignment problem through human-machine dialogue. In the area of conversational agents a different but related concept is studied, namely \textit{dialogue alignment}. This concerns alignment processes \emph{in} dialogues, as opposed to the use of dialogues \emph{for} human-machine alignment as we introduce in this paper.

The concept of alignment in dialogue was first proposed by \citet{pickering2004toward} in response to the need for an account of the basic processing mechanisms that are employed during natural dialogues, instead of isolated words, sentences and texts alone. Their fundamental claim was that interlocutors align their linguistic representations in a dialogue, and it is such convergence and alignment that underlies communication success. For example, interlocutors tend to develop the same set of referring expressions to refer to specific objects \cite{brennan1996conceptual}. Besides the linguistic representation, at non-linguistic levels interlocutors imitate each other in many respects \cite{branigan2010linguistic,garrod2009joint}, such as postures and facial expressions. Moreover, \citet{garrod2007alignment} identified several sources of alignment, where they discussed alignment via beliefs about one's interlocutor, imitation, agreements between interlocutors, feedback, and physical co-presence.

Dialogue alignment in the conversational agent community thus focuses on how people use linguistic and non-linguistics aspects in dialogues to align with each other and achieve communication success. A dialogue in this sense can be seen as ``a joint action in which the participants' goal is to establish aligned representations of what they are talking about'' \cite{garrod2009joint}. This has some overlap with our notion of AI alignment dialogue in the sense that an AI alignment dialogue is also a joint action with a goal, however, to establish aligned representations of user needs. Dialogue alignment processes may be part of an AI alignment dialogue in order to achieve successful human-AI alignment and provide the proper support to the user.

\subsection{Behaviour Support Agents}
\label{sec:how_agent_work}
To give a clearer picture of the kind of support agents we are aiming for in which an AI alignment dialogue is implemented, below we explain the techniques that such behaviour support agents could utilize to provide support. For a support agent to provide support that is in line with what a user wants, a user model is needed that represents what a user finds important and that the agent can reason about. A user model is a representation of the properties of a user that may be relevant to the support, such as values, preferences, needs, and/or cognitive and behavioural characteristics. The user characteristics in the user model may be explicitly provided by the users themselves, for example, by filling out questionnaires; alternatively they can be inferred implicitly from the (raw) user data \cite{johnson2005user}.

In our research, we envision the support agent to adopt knowledge-based techniques where the user's motivational attitudes and their relations with user behavior are modeled explicitly.
For example, the user model would be able to describe the interrelations between user's goals, the values behind them, and the conflicts with current desires. Such user models, which have been referred to as Semantic User Models \cite{berka2022misalignment}, employ techniques for modeling knowledge in a similar way to the work on ontologies for knowledge representation and the semantic web. Formal foundations of these knowledge representations have been developed by \citet{tielman2018should} and \citet{kliess2019good}. Other similar work includes \citet{cranefield2017no}'s research on developing a model that takes into account user preferences and moral values and a computational mechanism for reasoning about them. \citet{ajmeri2017arnor} modelled social constructs of the users for privacy-aware personal agents. In this paper, we investigate how AI alignment dialogues can be used to elicit the explicit knowledge to be included in the user model from the user, especially in scenarios where misalignment occurs.

\section{AI Alignment Dialogues}
\label{sec:AD}
In this section, we outline the concept of AI alignment dialogues that we propose in this paper. We will start with an illustrating example of how misalignment between users and support agents could happen and we illustrate what a corresponding AI alignment dialogue could look like. \\

\noindent {\fontfamily{lmss}\selectfont
\underline{Misalignment example:}}

\begin{quote}
    During the first conversation, John, the user, tells the support agent about his ideal exercise schedules and asks the agent to help remind him. But as time passes, he realizes that he does not like the original schedule anymore and wants to change it. If the support agent asks him to do exercise based on the outdated information, there would be a misalignment situation.
\end{quote}

\noindent {\fontfamily{lmss}\selectfont
\underline{Alignment dialogue example:}}

\begin{quote}
\begin{description}[labelwidth =\widthof{\bfseries999999}, leftmargin = !]

  \item[John:] I don't like the exercise schedule.

  \item[Agent:] Are you no longer motivated to exercise?

  \item[John:] I am, but I just want more variety.

  \item[Agent:] Okay. Anything in particular that you would like to include?

  \item[John:] Could you add swimming to my schedule and make suggestions more randomly?

  \item[Agent:] Yes. Anything else I can do for you?

  \item[John:] No thank you.
\end{description}
\end{quote}

The example above illustrates a misalignment scenario and an alignment dialogue. Based on these, in \autoref{sec:concept} we will elaborate on the concept of misalignment, how it can arise, and how an AI alignment dialogue could address it. In \autoref{sec:pipeline} we provide a high-level structure of AI alignment dialogues.

\subsection{AI Alignment Dialogue Concept}
\label{sec:concept}
First, \textbf{what is (mis)alignment?} With the scenarios created using the scenario-based approach (explained further in \autoref{sec:scenarioapproach}), we identify three types of alignment relevant in the context of  behaviour support agents. \autoref{fig:mis_type} shows these with the circled numbers.

\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{misalignment_types.pdf}
\caption{Alignment dynamics in user-agent interaction: types of alignment (1,2,3) and changes that could cause misalignment (a,b,c); see text below for further explanation. The primary goal of alignment dialogues is addressing the first type of alignment, as indicated by the solid blue arrow.}
\label{fig:mis_type}
\end{figure}

The three (mis)alignment types are explained in more detail below. Each of these alignment types refers to comparison of two elements of the user and/or agent which may (mis)align.

\begin{enumerate}

\item \textbf{Agent's support actions \& what the user needs/wants:} In the context of this study, we define the user's needs as `the means for them to achieve a certain goal which the agent facilitates and promotes.' In the dialogue example above, the user's needs could for example be to be reminded to exercise or to be told when to exercise and in what way. If the agent's support actions correspond with these needs, there is alignment. A corresponding notion of misalignment can be described conversely as `a situation where the provided support does \emph{not} match what the user needs or wants.'

\item \textbf{Agent's user model \& user's self model:} The second type of alignment compares the model the agent has of the user with the way the user thinks about their own needs and wants (their self model). If the information in the user model corresponds with the user's understanding of themselves, there is alignment. This type of alignment is closely connected to the first in the sense that misalignment between mental models may be one of the reasons that the agent's support does not match the user's needs.

\item \textbf{User's actual behaviour \& their desired behaviour:} The third type of alignment compares the user's actual behaviour with their desired behavior according to their own understanding. If this is aligned, the user's behaviour is compliant with their goals. This type of alignment is important to consider because a user's non-compliance behaviour can be an indication that more or different support is needed, pointing to misalignment of the first type. It may also be an indication that the user's goals and their desired behaviour have changed, indicating a possible misalignment of the second type.

\end{enumerate}

The first type of alignment is the broadest, encompassing the second and the third types of alignment. Since the agent can never fully grasp the ``true'' self model of the user, it cannot be certain that the second and third alignments hold. We have to rely on users to communicate their needs to the agent, as part of alignment dialogues, to know if there is misalignment. This motivates us to choose the first type of alignment as the main focus. This is also reflected in our scenarios used in the user study (\autoref{tab:scenario_analysis}) that the second and the third type of misalignment are in a way the first type misalignment. We see users as our ultimate source, understanding their needs and desires through dialogue to determine if a case is misalignment.

It is important to note that what the user wants in a specific moment may not be what they need with regard to their goals. Similarly, there might be a conflict between short term and long term goals, similar to the alignment goals of \citet{gabriel2020artificial}, as listed in \autoref{sec:aialignment}. This then gives rise to what may be seen as a moral challenge of whether the agent should align with what the user wants now, or what they need long term. The purpose of this paper is, however, not to decide what to align with. Instead, we focus on \emph{how} the user wants to talk about what they need or want in an alignment dialogue. Regardless of any discrepancy between user needs and wants, as long as the support from the agent does not match with either of them, it is considered as the first type of misalignment. The focus of this study is then to investigate \emph{how} to resolve this via an alignment dialogue. The outcome of this dialogue can then be a way for the agent to determine the most appropriate support.

\textbf{How does misalignment arise?}
In the example, misalignment arises because the user changes their mind with regard to their desired exercise schedule.
We identify three main reasons why misalignment can arise. First, the agent's reasoning process can be wrong. Second, the agent's understanding of the user can be wrong in the first place. Third, something can change that causes the agent to have a wrong understanding. Regarding the last one, we further identify three aspects that could change and cause misalignment (illustrated in \autoref{fig:mis_type} with the circled letters):
\begin{enumerate}[label=(\alph*)]
    \item \textbf{Context}: This includes the external factors or environments of the user, such as the weather, special occasions or events. When the context changes, the original support may no longer match users needs
    \item \textbf{User's internal state}: A user's internal states encompass the user's emotions, stress level, physical or mental conditions, etc.
    \item \textbf{User's desired behaviour}: As time passes, the user may want to adjust their goals or other motivational attitudes. In this case the user model may have been correct at the beginning; however it is the user themselves who changes over time, requiring the agent to adapt the user model to ensure alignment.
\end{enumerate}

One could argue that the user's internal state is also a kind of context. However, the difference between them is that, in our definition, context focuses on objective factors that are relevant to the user but not necessarily directly part of them; yet, the user's internal state  highlights the user's own condition. While both the user's internal state and the user changing their desires are about the user themselves, the distinction is made because the latter  is directly related to what the user wants, while the former  may concern additional factors that affect whether the support is in line with the user's needs.

\begin{figure*}[ht]
\centering
\includegraphics[width=1\textwidth]{pipeline_mix.pdf}
\caption{Alignment dialogue pipeline.}
\label{fig:pipeline}
\end{figure*}

\textbf{What could AI alignment dialogues look like?}
We define AI alignment dialogues as `dialogues with which the agent and user try to achieve or maintain alignment.' This can include first establishing if there is a misalignment, as it might not always be obvious to the agent if an observation of the user's behaviour points to a misalignment. If there is a misalignment, the conversation could shift to talking about how to solve the situation. The content of an AI alignment dialogue aims for the agent to understand the situation. The agent needs to be able to know why the support that is currently being provided is not the kind of support the user wants or needs and, more importantly, how to re-align the support. In our envisioned approach the agent gains this knowledge by way of a conversation , where the user and the agent take on a question-answering approach. The cycle will continue until the misalignment no longer exists, and the agent will have obtained a better understanding of the current situation.

\subsection{AI Alignment Dialogue Pipeline}
\label{sec:pipeline}

\autoref{fig:pipeline} outlines the general flow of an AI alignment dialogue from start to finish, describing different possible routes. In the \textbf{initiation} phase, depending on the misalignment scenario, the dialogue can be initiated by either the agent or the user. If the agent perceives non-compliance or unexpected (from agent's perspective) user behaviours, it could initiate an AI alignment dialogue to ask about it. The agent could also have periodic check-ins with the user. The user would be the dialogue initiator in cases where they want to talk about their needs. The second phase is the \textbf{support conversation}. In the support conversation phase, depending on the scenario, the agent and the user could be talking about user needs (e.g., reschedule or cancel the original plan); or the agent could be trying to convince the user to comply with their norms or desired behaviours. This could already suffice: for example if the user shows compliance, it could lead to the end of a dialogue. A dialogue would also end if the agent deems it appropriate (e.g., keep persuading would annoy the user). If needed, the agent could transit from a support conversation to a \textbf{user model conversation}, where it asks about in-depth aspects of the user's motivation such as their values and what is important to them. The outcome of a user model conversation could be that the user model is changed or updated or the agent drops the conversation.

The support conversation and the user model conversation are closely intertwined. They are not always sequential, nor are they always separable: a support conversation may also be related to the user model. For instance, if the user wants to change their schedule for the future, the user model would have to be updated. The user model conversation is of importance if it comes to determining the root cause of a misalignment and it also helps the agent with generalization which in turn aids in future improvements of its support. \autoref{fig:mapping} shows an example of an alignment dialogue from the user study following the structure of the pipeline.

\begin{figure}[h]
\centering
\includegraphics[width=0.48\textwidth]{map_pipeline.png}
\caption{An example of alignment dialogues marked with different phases, following the structure of the pipeline.}
\label{fig:mapping}
\end{figure}

\section{User Study}
\label{sec:study}
In the previous section we have outlined what we mean by (mis)alignment and how we see the role of alignment dialogues. To understand in more detail how we could shape AI alignment dialogues, we performed a qualitative user study to explore people's opinions and ideas on alignment dialogues. We explicitly choose to approach our research question from the perspective of user's preferences, following the assumption that those are central for support agents. In the following sections we describe our methodology, participants, materials, and procedure.

\subsection{Research Methodology}
The user study was performed in the form of focus groups using a scenario-based approach. The reason to conduct focus groups instead of one-on-one interviews is that focus groups encourage the participants to talk to one another and ask or comment on each others' experiences and points of view \cite{kitzinger1995qualitative}. This is particularly useful at this stage of the research, as we aim to explore in an alignment dialogue, what is important to them, how they want to converse with the support agent, etc. The interaction between the participants in a focus group could spark more discussions that we might not get in one-on-one interviews. At the beginning of the sessions, the moderator explicitly emphasized that the purpose is to gather different opinions and that there is no right or wrong answers, to minimize the possibility that some participants are afraid to speak up because their opinions are different than what has been said. The sessions were recorded and transcribed. Transcripts were analyzed using qualitative data analysis methods.

\subsubsection{Scenario-based Approach}
\label{sec:scenarioapproach}
In the focus groups, the participants were presented with a variety of different scenarios to give their opinions on. Scenario-based approaches are widely applied in the design of  interactive systems to understand and envision the potential problems and outcomes of new technologies \cite{rosson2009scenario,carrol1999five}. Scenarios also describe the systems in terms of the problems users could encounter when they use the systems, ensuring that design will remain focused on the needs and concerns of users \cite{rosson2009scenario}. The term `scenarios' has different definitions \cite{ramirez2015scenarios}. In this study, we followed \citet{spaniol2019defining}'s definition that \textit{scenarios have a temporal property rooted in the future and reference external forces in that context}, using engaging narratives to create scenarios \cite{rosson2009scenario,carrol1999five}. The created scenarios are plausible situations where the support provided by the agent does not match user needs.

We followed the scenario generating procedure summarized by \citet{schnaars1987develop} to construct the scenarios. We began by identifying the factors that are expected to affect the forecasting misalignment situations, such as what could trigger the misalignment and what could the corresponding dialogues be. We then postulated a set of possibilities for each of these factors. From a large number of combinations of the possibilities of these factors, we selected six scenarios. The selection was based on differences and diversity from other scenarios to ensure a sufficiently wide range of scenarios that touches on different types of challenges. For each scenario, we had one or two versions of alignment dialogues that aimed to solve the corresponding scenario.

\subsubsection{Data Analysis Method}
\label{sec:analysismethod}

Because the concept of alignment dialogue is new and the research is still at its infancy stage, we are interested in the end-user's attitudes, needs, and desires. Consequently we employ a qualitative approach.

Qualitative data analysis approaches are sometimes criticized as being subjective and merely reflecting the researcher's own opinions, biases and interests \cite{draper2004principles}. Another critique mentioned in the literature concerns lack of reproducibility and generalisability \cite{mays1995qualitative}. However, following \citet{cameron1963informal}, we posit that ``\textit{Not everything that can be counted counts, and not everything that counts can be counted}'', for example when it concerns understanding people's intentions, motives, beliefs, attitudes, and values that lie behind certain patterns of behaviour \cite{draper2004principles} and opinions. Since the purpose of our study is to understand how people want to engage in alignment dialogues and what are the reasons behind their opinions, we consider a qualitative approach to be appropriate.

There are a number of approaches to the analysis of qualitative data. These approaches are aimed at providing a structured analysis, combating the critique of subjectivity. In the present work, we aim to obtain an understanding of the elements end users would like in alignment dialogues and the relationship among these elements, developing explanatory theory or model \textit{grounded} in the data. This motivated the choice of grounded theory as our data analysis method. In particular, the constant comparative method is a necessary strategy to develop a grounded theory \cite{kolb2012grounded}. It includes that every part of data is constantly compared with all other parts to explore variations, similarities and differences \cite{hallberg2006core}. Three major stages characterize the constant comparative analysis \cite{strauss1998basics}, namely open coding, axial coding, and selective coding. We will discuss these in detail in the next paragraph. In addition, we also incorporated some key stages of \citet{krueger1994focus}'s framework analysis, as it provides a clear series of steps and descriptions of how each step takes place. Framework analysis also allows themes to develop both from the research questions and from the narratives of research participants. \cite{rabiee2004focus}.

Combining the two analysis methods mentioned above, we analyzed the focus group transcription with the following steps \cite{krueger1994focus,strauss1998basics}.

\begin{enumerate}
    \item Familiarization: at this step, we familiarized ourselves with the data by reading the full transcriptions several times in an effort to immerse in the details and get a sense of the interview as a whole before breaking it into parts \cite{rabiee2004focus}.

    \item Open coding: the data are chunked into small units and coded with a number of words that represent key points in the data.

    \item Indexing and charting: the quotes are lifted from their original context and rearranged to prepare for the next step.

    \item Axial coding: similar codes are grouped together to create categories from the open codes.

    \item Selective coding: central categories that connects all the codes are identified.

    \item Interpretation and theory building: emergent themes are linked and visualized. The focus is the relationship between the quotes, and the links between the data as a whole \cite{rabiee2004focus}.

\end{enumerate}

It is important to note that the analysis is not performed in a linear fashion \cite{rabiee2004focus} and that several iterations of coding and re-coding of the data may take place until a satisfactory level is reached.

\subsection{Participants}
A total of 13 adults participated in two focus groups, seven in the first group and six in the second group (eight males and five females, age = 26.08 years, SD = 2.72 years) from various countries of origin. The participants were recruited through our networks or through advertisements on social media. We obtained approval to conduct the study from the Human Research Ethics Committee at [Anonymized], ID nr [Anonymized].
We e-mailed the informed consent forms, including request for consent to record videos, to the participants before the study and asked them to sign it.

\subsection{Materials}

The study was divided into two parts. The first part consisted of general questions with regard to behaviour support agents. The purpose of the first part was to familiarize the participants with this type of agent and its role, as well as to understand their general attitudes towards support agents. We considered that the discussion from this part could also provide complementary insight to our research questions; for the second part, we focused on participants' opinions on alignment dialogues. Participants were presented with six misalignment scenarios. The scenarios center around the topic of healthy lifestyles, with support agents helping users plan their exercise schedules or eat healthier. These six scenarios cover the three aspects of changes that could cause misalignment, as illustrated in \autoref{fig:mis_type}. Additionally, we included two intriguing scenarios that do not fall into three aspects. One of them is when the provided support is in fact in line with user needs but it is so `accidentally'. This could be because the user model or the reasoning process is wrong, and yet the result turns out to be suitable by chance. The other scenario is when the agent is being obviously pushy in the alignment dialogue, which in itself might be a misalignment. The analysis of the difference between scenarios is presented in \autoref{tab:scenario_analysis}. Each scenario depicted a misalignment situation where a fictional user persona and the agent needed to engage in a conversation. One or two versions of such needed conversation, i.e., alignment dialogues, were created for discussion. These versions of dialogues differ in the initiators (agent or user), the timing, the depth of the conversation and the final solutions. The complete material can be found in the supplemental files.

\begin{table*}[h]
  \centering
  \caption{Scenario selection criterion. Type 1 misalignment refers to the misalignment between agent's support actions and user needs; Type 2 misalignment refers to the misalignment between agent's user model and user's self model; Type 3 misalignment refers to user's actual behaviour and their desired behaviour. More details on the types are in \autoref{sec:concept}.}
  \label{tab:scenario_analysis}
  \begin{tabular}{lllcc}
    \toprule
    \textbf{Scenario}
    &\multicolumn{1}{p{4cm}}{\textbf{Criteria 1:} Reasons that misalignment arises}
    &\multicolumn{1}{p{4cm}}{\textbf{Criteria 2:} Types of misalignment}
    &\multicolumn{1}{p{3cm}}{\textbf{Criteria 3:} Accidental correct support}
    &\multicolumn{1}{p{3cm}}{\textbf{Criteria 4:} Dialogue itself as misalignment}\\
    \midrule
    Scenario 1&Context&Type 1&-&-\\
    Scenario 2&User's internal state&Type 3 \textrightarrow Type 1&-&-\\
    Scenario 3&Context&Type 1&-&-\\
    Scenario 4&User model&Type 2 \textrightarrow  Type 1&-&-\\
    Scenario 5&-&-&\checkmark&-\\
    Scenario 6&User's internal state&Type 1&-&\checkmark\\
  \bottomrule
\end{tabular}
\end{table*}

\subsection{Procedure}
\label{sec:procedure}
Due to the Covid-19 situation, both sessions were conducted online via Microsoft Teams. All sessions were video recorded for the purpose of making transcriptions. The recordings were deleted once they were transcribed. The participants were given vouchers worth 15 euro as a thank you for their contributions.

At the beginning of the sessions, the overall objective of the study was explained to the whole group: to explore how the end-users want to talk about misalignment with the support agent. The material was shared with the participants while going through each page as per the moderator's instructions. In the first part, we asked each participant about their personal attitudes toward support agents. In the second part, we asked the participants to first read a misalignment scenario and its alignment dialogues. After they finished reading, we asked them to discuss and compare the dialogues, and then we moved on to the next scenario and discussion. The process continued until all six scenarios were discussed.

For the structure in the discussion, we prepared the following questions to guide the participants. These questions were asked to the entire group, rather than to an individual, to stimulate group discussion.

\begin{itemize}
    \item Which version of the dialogue do you prefer, or which part of which dialogue do you prefer? Why?
    \item Is there a certain part of the dialogues that you particularly like/not like? Why? How would you want to do it instead?
\end{itemize}

Furthermore, we are interested in users' subjective feelings about their relationship with the agent after engaging in an alignment dialogue. This is particularly important as how users perceive the agent may ultimately affect the agent's effectiveness and resultant user behaviours. We adopted some of the constructs from the autonomous agent teammate-likeness (AAT) model developed by \citet{wynne2018integrative}. The AAT model was introduced to help guide research in the human–agent team (HAT) domain to understand humans' perceptions of their intelligent partners. Applying to our use case, the user and the agent need to work together, as a team, to achieve the user's goal.

Originally, there were six constructs in the AAT model which are measured with a series of statements, each statement representing one of the six AAT constructs, using 5-point Likert scales \cite{wynne2019autonomous}. As not all the constructs are relevant or applicable for the goal of our research and our study was qualitative in nature, we used the statements of the constructs and incorporated them into our discussion questions. We asked participants how they feel in terms of AAT constructs as highlighted below.

\begin{itemize}
    \item Which dialogue is more `intelligent', as in has more capability in providing support? (AAT construct: perceived agentic capability)

    \item Do you feel one dialogue is more supportive over the other? (AAT construct: perceived benevolent intent)

    \item After which dialogue do you think the agent would be more `on the same page' as you? (AAT construct: synchronized mental model)
\end{itemize}

With this level of modification of the AAT, the original reliability and validity no longer apply. However, for the purpose of this study it is more important to gather the participants' attitudes on the dialogues and the reasons behind these rather than the rating of the statements.

\section{Results}
\label{sec:results}
We transcribed the audio recordings from both focus group sessions and imported these transcriptions into QSR NVivo \cite{nvivo2020} to perform the qualitative analysis.

\subsection{Codes}
\label{sec:codes}

\begin{table*}
  \small
  \caption{Categories, codes and example quotes (Codes and quotes are not an exhaustive list).}
  \label{tab:quote}
  \begin{tabularx}{\textwidth}{llX}
    \toprule
    \textbf{Categories}&\textbf{Codes}&\textbf{Example Quotes}\\
    \midrule
    \multirow{3}{*}{Content} & Not supportive &\relax[Q1] It's supporting him as it is not fighting, but it's not supporting him to be healthier.\\
    & User in control & \relax[Q2] John should have a possibility to say to the app that he's not working out today, so the app doesn't bother anymore.\\
    & Find solutions & \relax[Q3] I think if the app sees him constantly rejecting, it should just suggests smaller amounts of exercise. \\
    \midrule
    Language&Language& \relax[Q4] Don't call it a cheat meal because it implies that what you're doing is not nice.\\
    \midrule
    \multirow{4}{*}{Impact} & Understand me & \relax[Q5] Honestly I would go for B. It tries to understand my reasoning.\\
    & Punished & \relax[Q6] It says "I adjust your diet for a bland diet to balance it." That sounds more like a punishment\\
    & Confused & \relax[Q7] I don't understand why both dialogues end with "Is convenient also important so I should register in the system." I don't get what the point of that question is for the app.\\
    \midrule
    Wishes&Wishes& \relax[Q8] I would like to make `private groups' with friends, so that we can have competitions to motivate each other.\\
  \bottomrule
\end{tabularx}
\end{table*}

In this section we describe the codes that have resulted from our data analysis. First, a thorough reading (\textit{Step 1} in \autoref{sec:analysismethod}) of the transcription allowed us to derive a preliminary coding schema from the data material. In the second round of analysis, each piece of text was annotated with the appropriate codes (\textit{Step 2}), and the relevant codes were grouped together (\textit{Step 3 \& Step 4}), resulting in four categories. These categories are groupings of codes that together represent the main elements emerging in alignment dialogues:
\begin{itemize}
    \item \textbf{Content} includes the codes with regards to the participants' views and opinions on the agent or the dialogues.
    \item \textbf{Language} focuses on how a sentence or a piece of information is expressed.
    \item \textbf{Impact} covers a rather broad theme that consists of the user's positive and negative feelings caused by the alignment dialogues, such as being pushy or judgemental.
    \item \textbf{Wishes} encompass other additional functions that participants wished the agent to have, such as recommending fun sport activities in the city, or incorporating their menstrual cycles when giving exercise advice.
\end{itemize}

To illustrate each category, a few quotes and their corresponding codes and categories are shown in \autoref{tab:quote}.

\subsection{Affect model}
\label{sec:model}
With no more new codes to be found, the last steps in the analysis are selective coding (\textit{Step 5}) and theory building (\textit{Step 6}). To be able to build up these categories into a theoretical model, we broke down the four categories into smaller ones and reorganized them, resulting in a model that describes the effect of the alignment dialogue on the user. It also provides some additional insights regarding the connections between elements that did not emerge directly in the coding process. The model explains how the different aspects relate to each other, focusing on \textit{why} people have certain views and opinions towards the dialogue content, and \textit{how} it has an impact on the user.

\begin{figure}[ht]
\centering
\includegraphics[width=0.45\textwidth]{model.pdf} %
\caption{Model of how alignment dialogues affect user feelings.}
\label{fig:model}
\end{figure}

\begin{table*}
  \small
  \caption{Example quotes for user attributes and conversation attributes in the affect model.}
  \label{tab:model_quote}
  \begin{tabularx}{\textwidth}{X p{3cm} p{3cm}}
    \toprule
    \textbf{Example Quotes}&\textbf{Attributes}&\textbf{Feelings about}\\
    \midrule
    \relax[Q9] "Since you're going to have unhealthy food" It feels like a judgment value on the food.  &\multirow{3}{*}{Ways of expression}&Themselves (judged)\\
    \relax[Q10] Suggesting have a "bland diet" it feels like you're really being punished for it. && Themselves (punished)\\
    \relax[Q11] B just gives me guilt, like "oh is health more important than your comfort?"&&Themselves (guilty)\\
    \midrule
    \relax[Q12] Just saying "you set this goal," it's very annoying. &\multirow{5}{*}{Ways of expression}& Agent (annoying)\\
    \relax[Q13] I think dialogue A is quite rude because it's just pointing out his behaviours with a lot of questions, and that could annoy the user. && Agent (rude)\\
    \relax[Q14] I think the system can first empathize, just say "I know you're tired" or "I know your day is not going well, but..." to put it in a suitable manner for the user. && Agent (empathetic)\\
    \midrule
    \relax[Q15] I understand why B is asking this way, because it tries to learn you so that it can optimize in the next discussions and so on. But from a user's perspective, it's not user friendly.
    & \multirow{3}{*}{User's understanding} & Agent (not user friendly)\\
    \relax[Q7] in \autoref{tab:quote}&& Agent (confusing)\\
    \midrule
    \relax[Q16] It suddenly asks me according to my habit, that makes me very confused. I've never used anything which asks me suddenly.
    &\multirow{4}{*}{User's expectation}& Agent (confusing)\\
    \relax[Q17] It's annoying, because I already said I don't want to go running because it's raining, but it's again suggesting me another outdoor activities
    && Agent (annoying)\\
    \midrule
    \relax[Q18] Usually something tells me just to do it and I can't do it at that moment, I forget again. Then I'd think it's not useful&User's context&Agent (not useful, not supportive)\\
    \midrule

    \relax[Q19] It looks like it keeps noticing everything I'm doing. Normally people don't like being tracked too much.&-&Unclear (general negative feeling ``not like it'')\\

  \bottomrule
\end{tabularx}
\end{table*}

The model is shown in \autoref{fig:model}.
It starts from the \textbf{dialogue content} on the left side, which is the alignment dialogue that the user and the agent have. The dialogue content could have an impact on the \textbf{user's feelings}, which is similar to the \textit{impact} and \textit{content} categories in \autoref{tab:quote}. Feelings were further separated into the \textit{user's feelings about themselves} and \textit{how they feel about or towards the agent}. For example, the conversation could make the user feel guilty or the user could think that the agent is not being supportive. This distinction is crucial as the objects to which the feelings are directed are essentially different. Separating the two kinds of feelings allows us to better understand the reasons behind them and clarify the relationship with the alignment dialogue.

Specifically, from the \textit{user's feelings about themselves} component in the model, we observed that different emotions are triggered by certain events. For example, when the agent uses comparative words to describe the user's choice or actions, it is likely to make them feel judged (see [Q9] in \autoref{tab:model_quote}). Negative feelings also arise when the agent points out the user's non-compliance behaviours ([Q13]). When the agent asks the user about their values based on its observations of their behaviour, participants indicated they would feel confused, disoriented, or annoyed ([Q16]).

After the coding, we observed that there are additional factors that play a role in the relation between the dialogue content and the user's feeling. Take [Q9] for example: \emph{how} the agent says things might contribute to the user feeling a certain way. To identify these factors, we analyzed for cases where the participants expressed their feelings if there are any complementary influencing factors. We identified two kinds of attributes that could play a role in the feelings caused by the alignment dialogues: \textbf{conversation attributes} and \textbf{user attributes}.

Conversation attributes, corresponding to the \textit{language} in \autoref{tab:quote}, concern the ways in which a sentence or a piece of information is expressed. As demonstrated in \autoref{tab:model_quote}, \textit{ways of expression} influence both the user's feelings about themselves and about the agent. User attributes explain how various user aspects influence their feelings towards the agent. We identify  three user attributes. The first one is the \textit{user's understanding of the agent's intention}. To illustrate, consider [Q15] and [Q7] in \autoref{tab:model_quote}: the former user understands the agent's intention to ask them about their values, even if they still think it is not a user-friendly thing; on the other hand, the latter one shows the user's lack of understanding of the agent's intention, which leads them to complete confusion. The second user attribute we identify is the \textit{user's expectation of how things work}. [Q17] shows that the user assumes the agent knows that the problem of running is the outdoor aspect, and yet the agent does not, which makes it annoying. The last user attribute is the \textit{user's context or conditions}. For instance, the agent gives a reminder in a moment that the user is not available, and then the user forgets, which in turn make them think the agent is not useful ([Q18]). That being said, the content of the dialogue alone could also directly have impact on the user's feelings, as shown with the direct line between the \textit{dialogue content} and the \textit{user's feelings} in \autoref{fig:model} and [Q19].

The example quotes in \autoref{tab:model_quote} demonstrate how these conversation attributes and user attributes could be explanations for the feelings users may have during the interaction. However, it does not mean that these attributes are the direct and only reasons for a user's feelings. More research is required to investigate this.

\section{Suggestions and Considerations for Alignment Dialogue Design}
\label{sec:guidelines}

\begin{table*}
  \small
  \caption{Suggestions and considerations distilled from the quotes.}
  \label{tab:guidelines_quote}
  \begin{tabularx}{\textwidth}{X p{4cm}}
    \toprule
    \textbf{Example Quotes}&\textbf{Suggestions \& Considerations}\\
    \midrule
    \relax[Q14] in \autoref{tab:model_quote}

    &\multirow{5}{*}{S1: Empathy \& motivations}\\
    \relax[Q20] If you could have the rewarding system, also keeps me motivated. definitely would be really helpful and keeps me stick with the app.&\\
    \relax[Q21] Maybe the system suggests that if you do that, you would get a reward, I think it motivates the users. Motivations could be really triggering the user, I feel.&\\
    \midrule
    \relax[Q3] in \autoref{tab:quote}&\multirow{5}{*}{S2: Solutions \& alternatives}\\
    \relax[Q22] For example, "okay make sure you have like a power breakfast" or "try to eat protein snack with it." Give a suggestion or options without limiting it.&\\
    \relax[Q23] I think I like the fact that the system kind of suggest to move it to another day or something. I think that's more supportive and also keeps you on track.&\\
    \midrule
    \relax[Q24] It's an explanation of why he should be eating slightly differently&\multirow{4}{*}{S3: Explanations}\\
    \relax[Q25] Explaining why you should do certain things would help me most&\\
    \relax[Q26] It doesn't explain why the choice is bad. If it says you know "you're really gonna spike your blood sugar," you know then it would feel like you're stimulating a positive change.&\\
    \midrule
    \relax[Q27] With more positive framing rather than giving me critical feedback. Like rather than pointing out, it should tell me how I can balance it out. not telling me like I'm doing something wrong. it should say how can I improve, which I'm gonna do right now.&\multirow{4}{*}{C1: Wording, framing \& phrasing}\\
    \relax[Q9]-[Q14] in \autoref{tab:model_quote}&\\
    \midrule
    \relax[Q28] I would prefer if it asks me every time (if I want to exercise) even if I'm tired&\multirow{5}{*}{C2: When \& how to initiate or end}\\
    \relax[Q29] I think the system should directly change the exercise to the days that he's not tired and not ask&\\
    \relax[Q30] The system should know when to back off. it can still ask valid questions and maybe provide some positive encouragement but if the human clearly states that "stop bothering me" and if it still continues, I would also just uninstall the app.&\\
  \bottomrule
\end{tabularx}
\end{table*}

In the previous section we have presented our results of the data analysis, which provide insights in the effect of alignment dialogues on users. In this section we translate these insights into suggestions and considerations for designing a good alignment dialogue in the eyes of the users. To this end we further examined the quotes from \autoref{tab:model_quote} with a focus on the participants' reasoning about why they feel how they feel. For the reasons they gave, we put forward assumptions that could mitigate the unpleasant feelings. Furthermore, we incorporated the participants' wishes from additional quotes, some of which are shown in \autoref{tab:guidelines_quote}. In the following, we first present two key conclusions, which form the basis for the suggestions and considerations.

First and foremost, \textbf{the user's feelings need to be central} in the design of alignment dialogues. As our affect model shows, alignment dialogues can give rise to unpleasant user feelings. It may not always be possible to fully avoid such feelings, but dialogue design should aim to reduce unintended negative consequences where possible.
After all, the agent is there to support the user, not to cause the opposite effect. The second conclusion concerns \textbf{the agent's role.}
The support agent's primary job is to help the user and motivate them. So it needs to take into account their wishes while at the same time being motivating and supportive towards their goals. When these two aspects conflict, the agent needs to find a balance. It can be challenging to look after the user's feelings while supporting them with their goals, especially when the agent needs to bring up an issue regarding the user's behaviour. This could sound like an accusation to the user, even if this was not the intention. To address these challenges, we propose the following concrete suggestions that could help mitigate the issues. \autoref{tab:guidelines_quote} shows a number of quotes from the participants from which we distilled the design suggestions and considerations. These suggestions are not aimed to \emph{only} avoid user's unpleasant feelings. They are the distilled insights from the end users, which includes not only their feelings about themselves and towards the agent, but also other wishes as to how they would want to talk about the current misalignment situation with the support agent. The purpose of proposing the design suggestions and considerations are, therefore, to help shape alignment dialogues.

\begin{enumerate}[label=(S\arabic*)]
    \item The agent should address the user's non-compliance or unexpected behaviour with empathy.
    \item
    The agent should provide alternative solutions for working towards the user's goals.

    \item The agent should provide factual explanations when giving advice.

\end{enumerate}

We provide two further design considerations to address the aforementioned issues. These need to be further studied in order to translate them to concrete suggestions for the design of alignment dialogues.

\begin{enumerate}[label=(C\arabic*)]
    \item The agent should pay attention to the words chosen, the framing and the phrasing.
    \item The agent should know when and how to initiate and end an alignment dialogue so that the user is in control and can maintain their agency.
\end{enumerate}

As demonstrated by [Q28] and [Q29] and the following quote from a participant: \textit{``What if we can choose the way we are spoken to? Like I want a tough trainer or I want a very empathetic trainer. And you change the dialogue also based on that.''}, different people have different preferences regarding the agent's support style. This suggests there is need for personalization.

\begin{enumerate}[label=(C\arabic*),resume]
    \item The agent should personalize its support style according to the user's preferences.
\end{enumerate}

Design considerations C1 and C2 apply also to the realization of S1-S3, and C3 applies to all other considerations and suggestions.

\section{Connecting the Components}
\label{sec:connect}

In the previous sections we have proposed \emph{i)} the concept of alignment dialogues, including three types of (mis)alignment (RQ1) between a behaviour support agent and a user (\autoref{fig:mis_type}), and a pipeline that outlines the dialogue flow (\autoref{fig:pipeline}), \emph{ii)} an affect model that explains how alignment dialogues may have an effect on the user's feelings (\autoref{sec:model}), and \emph{iii)} design suggestions and considerations (RQ2) to be taken into account when creating behaviour support agents capable of having  alignment dialogues with their users (\autoref{sec:guidelines}).

These contributions of the present work are connected: causes of misalignment give rise to the need for alignment dialogues corresponding with its different phases; these dialogues might give rise to different types of user feelings due to several conversation and user attributes as specified in the affect model; the design suggestions and considerations in turn tie into these attributes as ways of addressing these potential effects.

\autoref{fig:connect_all} gives more details on how causes of misalignment, the dialogue pipeline, the affect model, and the design suggestions are connected.
For simplicity, only the relevant components in the dialogue pipeline are shown in the figure, split into three main phases of the dialogue pipeline: initiation (a), support conversation (b) and user model conversation (c).

\begin{figure}[ht]
\centering
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{connection_bringup.pdf}
        \caption{Dialogue initiation phase.}
        \label{fig:connection_bringup}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{connection_supportconvo.pdf}
        \caption{Support conversation phase.}
        \label{fig:connection_supportconvo}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{connection_UMconvo.pdf}
        \caption{User model conversation phase.}
        \label{fig:connection_UMconvo}
    \end{subfigure}
\caption{Illustrations of possible connections between the causes of misalignment (user icons \& context icon), its corresponding dialogue component (pink rectangles), and user feelings (black rounded rectangles). Between the dialogues components and user feelings are conversation attributes and user attributes (blue octagons) and how design suggestions (S) and considerations (C) could address the attributes or be applied to dialogue components.}
\label{fig:connect_all}
\end{figure}

In the initiation phase (\autoref{fig:connection_bringup}), when the agent brings up  non-compliance or unexpected behaviours of the user, it could sound like an accusation or make the user feel guilty or feel shame about themselves. Design suggestion S1 can be applied to this component to first empathize with the user.
\autoref{fig:connection_supportconvo} shows that when convincing the user to comply, the same strategy can be applied as this also concerns taking care of the user's feeling about themselves. In addition, the agent could appear to be annoying when trying to persuade the user. Therefore, the agent needs to take the user's context into account and know when to initiate and end the conversation.
Another component in the support conversation phase is to reschedule, cancel or change the plan. This  corresponds to our S2 in nature as they are about providing alternative solutions for working towards the user's goals. On top of that, the agent could provide explanations as to why it is giving this suggestion, which could make it be perceived as more supportive and helpful.
In the user model conversation phase (\autoref{fig:connection_UMconvo}), the agent should also accompany such conversation with explanations so that the user could understand why it is asking abstract questions.
It is important to know that these figures provide some examples of how different alignment dialogue concepts are connected and how design suggestions and considerations can be applied. They are not exhaustive illustrations. We can not yet grasp the entire picture of all the possible relationships at this stage of research.

\section{Discussion and Conclusion}
\label{sec:discussion}
In this section, we take this a step further and discuss several higher-level findings that have emerged during this process. These findings give us insights as to what is still missing in the picture with regards to our understanding of how to shape alignment dialogues.

\subsection{Discussion}

\subsubsection{Role of emotions}
At first glance, one may question why the alignment dialogues were designed to make the agent confrontational to trigger user's negative emotions. They were not created with such intention in mind, except for Scenario 6 where the agent was designed to be pushy by insisting that users adhere to their goals. In the rest of the scenarios, the alignment dialogues attempted to elicit the missing information from the user and the reasons why the support misaligned with them. More importantly, the alignment dialogues aimed to re-align the support, as explained in \autoref{sec:concept} and depicted in \autoref{fig:pipeline}. However, there are two underlying facets of the nature of behaviour support agents that make it prone to evoking some negative feelings in the user: 1) the agent's role is to address non-compliance behaviours of the user; 2) the agent needs to support the user towards their goals even if it is not what they want at the moment. These facets are in accordance with the dialogue pipeline and may thus be seen as inherent components of behaviour support agents. This is complemented with the design suggestions and considerations which in a way serve the affect model as an attempt to avoid or alleviate negative feelings, to some extent caused by the nature of the agent, and evoke positive ones.

That is, the design suggestions and considerations emerged from the need to address the challenge of accounting for the user's emotions that may be evoked by a support agent. This is in line with a significant body of existing research that advocates the integration of affective modules from different perspectives. \citet{becker2007emotions} developed emotions as integral parts of an agent's cognitive architecture, enabling the simulation of "having own emotion." Other research designed and implemented emotion-aware agents. In particular, they focused on their empathetic abilities, and demonstrated such an agent was rated higher, compared to the control condition agent, in terms of acceptance, perceived enjoyment, and intention to use the system \cite{lisetti2013can}, and positive mood reports \cite{ghandeharioun2019towards,de2020effectiveness}. There is also research that investigates approaches to provide personalized empathy that matches certain user types \cite{richards2018users} or capabilities \cite{morris2018towards}.

Most research emphasizes the importance of empathy in conversational agents, which is in line with our first design suggestion (\autoref{sec:guidelines}). In addition to the importance of being empathized with, users may experience other emotions that need to be addressed, such as feeling judged, confused, or guilty, as \autoref{tab:model_quote} shows. However, what emotions are evoked in support agents is poorly investigated. \citet{ahmad2020understanding} examined user emotions when using persuasive applications and the factors that triggered the experienced emotions. This study focuses on the static functionalities of systems such as the interface design and the content presentation, rather than the interactive events happening during the support process. Further research is needed to explore this, e.g., what types of emotions are triggered by what types of misalignment and by which aspects of the dialogue.

The upshot of this research suggests an affect model in which user's feelings are central. In a similar context, \citet{lupton2018just} found that even if an app is considered 'healthy,' (e.g., an mHealth app), the use of it can spark "frustration, disappointment, the fear of becoming too controlled, and annoyance or guilt evoked by the demands of the app." Therefore, by studying emotions in alignment dialogues, we can understand which are inevitable, and which can and should be minimized.
Going a step further, this is connected to the ethics of persuasive technology, as emotions can be exploited to exercise undue influence \cite{sax2018health}, identifying the emotional moments in which users are particularly sensitive to personalized persuasive strategies.
To this end, we need to emphasize that the goal of alignment dialogues is for the support agent to achieve or maintain alignment with the user, not to purposely manipulate or avoid emotions.

\subsubsection{User model conversation}
As \autoref{fig:pipeline} shows, there could be two different types of conversations in an alignment dialogue: a support conversation and a user model conversation. In the present study, we have come to the conclusion that the agent should be empathetic and motivating, and provide explanations and solutions when having the support conversation with the users. For the user model conversation, we have observed that the users' attitudes are likely to be negative when the agent tries to ask about abstract, broader reasons behind the user's actions such as their values and what is important to them in general (see e.g. [Q7] in \autoref{tab:model_quote}). However, it is not yet clear what the reasons for this are. It could be that users do not like to talk about values due to their abstract nature, that the conversation becomes too deep or personal too quickly, or that the timing is wrong. We have observed that problems arise in the transition between the support conversation and the user model conversation. We believe this part of the alignment dialogue is worth more research, including under which circumstances the agent should initiate the user model conversation and what we should take into account when designing user model conversations.

\subsubsection{Choice of whether to have an alignment dialogue}

``Why doesn't the system just learn from my behaviours automatically?'' We received this kind of question frequently in the focus groups. This indicates that the general public carries a vague belief that the support agent works with machine learning that can automatically `learn' everything. However, as we explained in \autoref{sec:how_agent_work}, ML is not the primary technique that we envision to be used in the agent.
As we argued in \autoref{sec:alignmentproblem} and \autoref{sec:AD}, the advantage of explicitly having a conversation with the user includes its ability to directly communicate about high-level concepts, which cannot always be deduced from behaviour. In addition, tracking behavioural data might have a negative effect on privacy, but asking the user explicitly requires more effort on the part of the user. However, for the agent to function correctly, we do need to obtain this user model in some way. We thus conjecture that there is a privacy-correctness-effort trade-off in deciding how to obtain the user model needed for personalized support.
Naturally, users would want the support agent to be correct and provide support that is accurate and in line with what they need (i.e., alignment), but at the same time they also want less effort from their side and want to maintain more privacy and reduce tracking (\autoref{tab:model_quote} [Q19]). Combining all three aspects (no tracking, no questions to the user, correct agent behaviour) is difficult if not impossible. So an important question remains: how do we determine the optimal trade-off for a user?

What is clear is that every participant had different preferences on how much they like to make an effort or to be tracked. Besides the individual differences, it could also be that a moment in time, a certain context or situation, or the way in which the agent asks about high-level concepts influences the preferred trade-off. Further research is needed to investigate whether people indeed see this as a trade-off. And if they do, it needs to be investigated why and at what cost
and whether other aspects (e.g., social norms about appropriate interaction) play a role.

\subsubsection{Future research}
Besides the research topics mentioned above, several other questions may be addressed in future work.
For example, how does the agent find the balance between assisting the user but at the same time not being too paternalistic or pushy? One could also investigate technical questions such as how to realize personalization of the style of interaction.
Whether focusing on a specific element or on the  dialogue as a whole, more research is needed to make the notion of alignment dialogue complete.

\subsection{Conclusion}

The aim of this paper was to 1) sharpen the notion of alignment in the context of behaviour support agents and 2) to investigate what an alignment dialogue could look like. To this end, a qualitative user study in the form of a focus group study was conducted. From this user study we developed a model that describes how alignment dialogues can affect users and design suggestions and considerations for the alignment dialogues themselves. These design suggestions and considerations are aimed at avoiding the negative emotions an alignment dialogue might evoke in the user -- an issue which became particularly apparent during the focus group study. Mutual understanding between the agent and the user during the process of an alignment dialogue can be considered a key factor, so trying to avoid negative emotions being brought about by the alignment dialogues is of utmost importance if we wish to create an agent which is more personalized yet also transparent at the same time. This study establishes foundations around alignment dialogues and sheds light on what is still missing in the picture for future development and research on an interactive approach to AI alignment in support agents.

\begin{acks}
This work was supported by the Hybrid Intelligence Gravitation Programme (project number 024.004.022).
\end{acks}

\bibliographystyle{ACM-Reference-Format}

redpajama_set_name: RedPajamaArXiv


A unique play programme for 18 months – 5 year old boys and girls helping to develop balance, co-ordination and control of a football. Also enhancing their social skills and confidence. The programme is backed by the NHS and Surestart and each session is themed on education curriculum topics for pre-schoolers.
Next stage up SOCCER SCHOOL and SOCCER ACADEMY run on Tuesday afternoons and Saturdays accomodating boys and girls up to and including School Year 5.


text:
Q: Getting external SVG file from React component I am trying to use SVG icons on my React site using an external SVG file with all of my icons.
I am using the <use> tag and calling them from a component. However, I get a console error that the browser cannot get the SVG file (404). It is currently in the same folder as my component jsx file.
I have an external file called svgSprites.svg:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" >
   <path id="icon-home" class="path1" d="M32 18.451l-16-12.42-16 12.42v-5.064l16-12.42 16 12.42zM28 18v12h-8v-8h-8v8h-8v-12l12-9z" />
   <path id="icon-camera" class="path1" d="M9.5 19c0 3.59 2.91 6.5 6.5 6.5s6.5-2.91 6.5-6.5-2.91-6.5-6.5-6.5-6.5 2.91-6.5 6.5zM30 8h-7c-0.5-2-1-4-3-4h-8c-2 0-2.5 2-3 4h-7c-1.1 0-2 0.9-2 2v18c0 1.1 0.9 2 2 2h28c1.1 0 2-0.9 2-2v-18c0-1.1-0.9-2-2-2zM16 27.875c-4.902 0-8.875-3.973-8.875-8.875 0-4.902 3.973-8.875 8.875-8.875 4.902 0 8.875 3.973 8.875 8.875 0 4.902-3.973 8.875-8.875 8.875zM30 14h-4v-2h4v2z" />
</svg>

and in my component:
<svg>
  <use xlinkHref="svgSprites.svg#icon-home"></use>
</svg>

redpajama_set_name: RedPajamaStackExchange


Love songs may not be something you'd expect to hear on Coathanga Strangla, but "Sooner Or Later" finds Lynch trapped in a frustrating and confusing relationship. The unusually soft production gives Lynch room to speak straight to the listener over somber piano notes that layer the otherwise frightening tale of a killer hiding a secret. Lynch's candid moments give the impression of a man struggling to balance himself through the different avenues of life. The emotionally driven hook lends the track a unique touch that is mostly unheard throughout Lynch's two albums. Truly a different take on the Coathanga Strangla's identity, "Sooner Or Later" is absolutely a standout on the sequel.


The Pine Center for the Arts has a busy month this October with a wide variety of programming available for the community. Here is just a quick preview of a few of the events that are being planned.
With "Close to Simple," Don Farrell shares his view of the world through photography and handmade frames and mats. Don sees beauty and connectedness in the world around him, from a micro view of a flower to patterns found in nature and man-made structures. Read more on the Art Center Blog about this artist.
Take a class with one of our local artists, Charlene. Students will enjoy painting wine glasses for this class and take home 2 completed glasses with an Autumn theme for use or display in their home. Advance registration is required for this event by 10/22 for supply purchases.
The Corner Cabaret Series will present a special evening with local author, Gayla Marty.
In the fall of 1979, Gayla Marty was a Minnesota exchange student in Tunisia, making friends and learning to cook in a simple kitchen with different ingredients. Making a Thanksgiving meal took on new importance and meaning as political and personal events upset their lives. Join her for a reading from her work in progress, "Cooking in Paradise".
Located in Pine City, the Pine Center for the Arts has been serving the Greater Pine City area since 2009. With a variety of programming opportunities, the non-profit, volunteer-led facility is a gathering place for artisans and art lovers alike. Artists interested in displaying their work or teaching others their skills are welcome to contact the Pine Center for the Arts. For more information, please see www.pinecenter.org.


text:
Helga Sermat
Helga Sermat was born in Toronto and grew up in a family of five children, immersed in the language and culture of her Estonian parents. Her mother was an avid photographer, painter, seamstress and gardener, and her father was a self-employed draughtsman and also an accomplished woodworker. Both were incredibly creative and resourceful, encouraging the same in their children.
Helga completed her bachelor of arts degree in humanities at York University in Toronto and continued further studies in theatre design, drawing, sculpture and printmaking at the University of British Columbia, Emily Carr Institute of Art & Design in Vancouver and Saidye Bronfman School of Fine Arts in Montreal.
While living in Vancouver, Helga worked as a costume and prop maker for theatre and dance companies and was a co-founder of Urban Source, an alternative art materials store, where she also taught workshops for children and adults. After moving to Montreal in 1997, she worked as a freelance illustrator and web designer while pursuing her own art on the side.
Helga now lives in Hemmingford, Quebec where she divides her time between painting and her lifelong passion for horses.
Helga is represented by Galerie St. Laurent in Ottawa, Ontario.
original art work and website © Helga Sermat

redpajama_set_name: RedPajamaCommonCrawl


Push is hard. Often, implementing realtime push in a website or web service means having to use unfamiliar software or frameworks. If it isn't an XMPP server with BOSH, then it's an esoteric HTTP server framework like Node.js or Tornado. Further, while the knowledge and tools necessary for load balancing a traditional web service are commonly found these days, scaling out and operating a push architecture is less straightforward. The interactions between server nodes are different. The traffic patterns are different. Even if you've got a handle on whatever particular approach for push you're using today, do you know how you'll scale it tomorrow?
Here we'll discuss Fanout's various products (such as Fanout Cloud), as well as topics such as realtime, push, distributed systems, synchronization, federation, and open protocols.


In Satmar Custody reveals the story of the Jaradi's, a Jewish Yemenite family, one of many that were brought from Yemen to the US (Monroe, NY) by the Ultra-orthodox Satmar Community which operates a propaganda machine against the immigration to Israel.
The story exposes a deep cultural gap between the Yemenite families and the Yiddish Satmar Community that became distractive and tragic to families who have traveled thousands of miles to an entirely different planet of their own, with strange rules, norms, morals and lifestyles.
Still in Yemen, Yemenite Jewish families are brainwashed by skillful missionaries, unable to defend themselves in the eye of this intricate and deceptive operation. The film follows the life of Yahia and Lauza Jaradi who were brought from Yemen into the Satmar Community. It starts on the day that the Jaradi couple received an urgent phone call notifying that their two and a half-year-old daughter, Hadia, died in a hospital in Paterson, N.J. Through their search for their daughter's body, they are getting closer and closer to what seems as the very painful truth about her faith.


text:
Q: Как можно реализовать циклически движущийся фон. Адаптивный под все экраны | CSS У меня есть фон космоса со звездами. Цель заставить его бесконечно крутиться. Все это я реализовал с помощью css animate. Если все это делать в px то все хорошо. Но если все делать в относительных единицах и добавить background-size: contain то при окончании анимации картинка встает на старое положение и происходит прыжок что очень сильно заметно. Может быть у вас есть идеи как можно реализовать все в относительных единицах что бы на всех экранах смотрелось отлично.

@keyframes move {
    0% {
        transform: translate(0);
      }
    100% {
        transform: translate(-1926px); /* The image width */
    }
  }

.container {
    overflow: hidden;
}

* {
  margin: 0;
}

.bg {
 background: url("https://res.cloudinary.com/dhd2yhzej/image/upload/v1646047075/img_sveppk.jpg") repeat-x;
 background-size: contain;
 height: 100vh;
 width: 3852px;
 animation: move 5s infinite linear;
}

https://codepen.io/kirillchaklidi/pen/gOXBGNm

A: Сделал чуть более быстрое смещение, чтобы видеть, что нет "дёрганий".
Но стоит учитывать, что так будет работать при условии "бесшовной" картинки.

body {margin: 0;}

.container {
  display: block;
  width: 100%;
  height: 100vh;
  background: url(//i.imgur.com/IdCl0le.png) repeat-x 0 0 / cover;
  animation: BGMOVING 5s linear infinite;
}

@keyframes BGMOVING {
  to {
    background-position: calc(100% - 100vw) 0;
  }
}


text:
Fun88, What Mexico Needs to Qualify for World Cup 2022
Fifa world cup 2022 Qualifiers: What does Mexico want to qualify for the World Cup? Do the mathematics at the Concacaf Calculator What does every group want to set a price price tag to the World Cup? Get the tickets for the t20 world cup this 2022!
Three fast tricks to win Baccarat very fast What teams can outstand during the t20 world cup
What are the T20 World Cup fixtures? Discover it now!
The CONCACAF qualifiers for the fifa world cup 2022p resumed on January 27. The fits are getting more and more more important, as it's far important now no longer to drop factors with the intention to steady one of the 3 direct tickets to the fifa world cup 2022, T20 World Cup vs soccer events, which is the most popular? fun88 online or to preserve directly to fourth vicinity for a hazard to play withinside the playoffs. As of February 2, Canada, the US and Mexico are main the Final Octagonal, with the 'Maple Leaf' group, which stays undefeated withinside the tournament, status out.
The unique case of the Mexican country wide group is worrisome because of the draw finished of their closing in shape towards Costa Rica; fun88 betting an end result that leaves them with 18 factors in 0.33 vicinity, simply one factor in the back of Panama, apparently their subsequent rival withinside the Octagonal.
With MARCA Claro's Playoff Calculator you may do the precise math to discover what the Tricolor wishes to steady their price price tag to Qatar 2022:
Which groups have already qualified for the Qatar 2022 World Cup?
Match Schedule: When does Mexico play?
The Mexican country wide group might be trying to make amends withinside the qualifying spherical and steady its vicinity in Qatar 2022, and to accomplish that, it's going to need to efficiently face the subsequent fits.
The Qatar fifa world cup 2022 is regularly taking shape, 32 groups will take part withinside the subsequent World Cup from November 21 to December 18, and there are a few nations which have already secured their vicinity, at the same time as others will accomplish that withinside the subsequent qualifiers.
The locations for Qatar 2022 are disputed amongst 31 groups (the hosts have already got a right away vicinity), that are disbursed to a number of the six current confederations, every of which has a variety of tickets. Here we let you know what they are, what number of and the way to get them.
Confederations
The Asian Football Confederation (AFC) has 4.five tickets and qualification is split into agencies. The pinnacle locations in each qualify for the World Cup, at the same time as the 0.33 locations play every different, with the winner advancing to the intercontinental playoff.
The Confederation of African Football (CAF) awards 5 tickets. This confederation has 10 agencies and the winners of every organization are paired in 5 spherical-robin fits. The winners of the mixture qualify for the World Cup.
The Confederation of North, Central American, Caribbean and Caribbean Association Football (Concacaf) has 3.five locations. The first 3 qualify directly, and the fourth vicinity is going to the intercontinental playoff.
The South American Football Confederation (CONMEBOL) has 4.five quotas. The first 4 qualify for the World Cup, and the 5th qualifies for the intercontinental playoff.
Fun88 The Oceania Football Confederation (OFC) presents handiest 0.five quotas. A general of 11 groups will compete for a vicinity, divided into agencies and could play towards every different unmarried in shape. The pinnacle in every organization will strengthen to a spherical-robin play-off, with the winners of every organization advancing to the very last and the winner of the very last going to the intercontinental play-off.
The Union of European Football Associations (UEFA) has the maximum tickets, a total of 13. It is made of 10 agencies and the pinnacle groups in every organization qualify directly, at the same time as the ultimate 3 tickets might be contested through the 10 second-positioned groups in every organization, plus groups selected from the Nations League ranking. The twelve groups will then be paired in six semifinal matches, from which 3 finals might be played, with the winners of every very last advancing to the World Cup.
How to play slots with strategy
So far, eleven groups have already booked their vicinity withinside the Qatar 2022 World Cup, one from the AFC and 10 from UEFA, leaving 21 tickets nevertheless available.
Fun88, Infantino The FIFA President says that Qatar has a Great Evolution of the World Cup 2022
Fun88, The OFC Tournament matches for world cup 2022


text:
require 'lock_jar'
require 'lock_jar/domain/dsl'

#
module Buildr
  class << self
    attr_accessor :global_lockjar_dsl

    def project_to_lockfile(project)
      "#{project.name.tr(':', '-')}.lock"
    end
  end

  def lock_jar(&blk)
    Buildr.global_lockjar_dsl = ::LockJar::Domain::Dsl.create(&blk)
  end

  namespace 'lock_jar' do
    desc 'Lock dependencies for each project'
    task('lock') do
      projects.each do |project|
        next if project.lockjar_dsl.nil?

        # add buildr repos
        repositories.remote.each do |repo|
          project.lockjar_dsl.repository repo
        end
        ::LockJar.lock(project.lockjar_dsl, lockfile: Buildr.project_to_lockfile(project))
      end
    end
  end

  module LockJar
    #
    module ProjectExtension
      include Extension

      def lock_jar(&blk)
        @lockjar_dsl = ::LockJar::Domain::Dsl.create(&blk)
        @lockjar_dsl.merge(Buildr.global_lockjar_dsl) unless Buildr.global_lockjar_dsl.nil?
      end

      def lock_jars(*args)
        lockfile = Buildr.project_to_lockfile(project)
        opts = {}
        groups = ['default']

        args.each do |arg|
          if arg.is_a?(Hash)
            opts.merge!(arg)
          elsif arg.is_a?(String)
            lockfile = arg
          elsif arg.is_a?(Array)
            groups = arg
          end
        end

        ::LockJar.list(lockfile, groups, opts)
      end

      def lockjar_dsl
        @lockjar_dsl || Buildr.global_lockjar_dsl
      end

      after_define do |project|
        task compile: 'lock_jar:compile'
        task 'test:compile' => 'lock_jar:test:compile'

        task 'eclipse' => 'lock_jar:eclipse'

        namespace 'lock_jar' do
          desc 'Lock dependencies to JarFile'
          task('lock') do
            dsl = project.lockjar_dsl
            if dsl
              # add buildr repos
              repositories.remote do |repo|
                puts repo
                dsl.repository repo
              end
              ::LockJar.lock(dsl, lockfile: "#{project.name}.lock")
            else
              # XXX: output that there were no dependencies to lock
              puts "No lock_jar dependencies to lock for #{project.name}"
            end
          end

          task('compile') do
            if project.lockjar_dsl && !File.exist?(Buildr.project_to_lockfile(project))
              fail(
                "#{project.name}.lock does not exist, run "\
                "#{project.name}:lockjar:lock first"
              )
            end
            jars = ::LockJar.list(Buildr.project_to_lockfile(project), ['default'])
            project.compile.with(jars)
          end

          task('test:compile') do
            if project.lockjar_dsl && !File.exist?(Buildr.project_to_lockfile(project))
              fail(
                "#{Buildr.project_to_lockfile(project)} does not exist, run"\
                " #{project.name}:lockjar:lock first"
              )
            end
            jars = ::LockJar.list(Buildr.project_to_lockfile(project), ['test'])

            project.test.compile.with(jars)
            project.test.with(jars)
          end

          task('eclipse') do
            if project.lockjar_dsl && !File.exist?(Buildr.project_to_lockfile(project))
              fail(
                "#{Buildr.project_to_lockfile(project)} does not exist, run "\
                "#{project.name}:lockjar:lock first"
              )
            end
            jars = ::LockJar.list(Buildr.project_to_lockfile(project), ['default'])
            project.compile.with(jars)

            jars = ::LockJar.list(Buildr.project_to_lockfile(project), ['test'])
            project.test.compile.with(jars)
          end
        end
      end
    end
  end
end

module Buildr
  # Patch Builder::Project to include Buildr::LockJar::ProjectExtension
  class Project
    include Buildr::LockJar::ProjectExtension
  end
end

redpajama_set_name: RedPajamaGithub


[white oak shaker cabinets] 28 images with dark oak, dark shaker oak yes cabinet and granite, white shaker kitchen cabinet hardware dark island with oak. Oak shaker cabinets honey shaker oak red oak shaker. Kitchen: astounding shaker kitchen decoration with oak.
[white Oak Shaker Cabinets] 28 Images With Dark Oak.
Dark Shaker Oak Yes Cabinet And Granite.
White Shaker Kitchen Cabinet Hardware Dark Island With Oak.
Oak Shaker Cabinets Honey Shaker Oak Red Oak Shaker.
Kitchen: Astounding Shaker Kitchen Decoration With Oak.
Kitchen After: Milky White Shaker Cabinet, Frigidaire.
Oak GS Building Supply Inc.
Solid Wood Kitchen Cabinets Information Guides.
Light Oak Shaker Kitchen Cabinets Kitchen Cabinet.
Dark Shaker Kitchen Cabinets Designs Ideas And Decors.
Oak Kitchen Cabinets Shaker Door Style CliqStudios.
Dark Brown Cabinets Design Ideas.
Natural Maple Kitchen Cabinets Dark Counter Maple Shaker.
Quartersawn Oak Cabinet Hardware Ideas Cabinet Works.
Dark Oak Kitchen Cabinets Smart Home Kitchen.
Kitchen Cabinets Color Gallery At The Home Depot.
Howdens Tewksbury Dark Solid Stained Oak Kitchen Cupboard.
What Are Mission Style Cabinets? Craftsman, Arts Crafts.
The 25 Best Shaker Style Kitchens Ideas On Pinterest.


text:
Q: MongoDB MapReduce, return only when count > 1 I have data in MongoDB. The structure of one object is like this:
{
    "_id" : ObjectId("5395177980a6b1ccf916312c"),
    "institutionId" : "831",
    "currentObject" : {
          "systemIdentifiers" : [
            {
                "value" : "24387",
                "system" : "ABC"
            }]
      }
}

I have to know how many objects have same institutionId and systemIdentifiers[0].value and want to return only those duplicated in that way.
In order to do that I group them up by these IDs and count occurrences.
The object (a pair of IDs) should be returned when count is greater than 1.
This is a chunk of code which does grouping with using MapReduce.
var map = function() {
    var key = this.institutionId;
    var val = this.currentObject.systemIdentifiers[0].value;
    emit({"institutionId":key,"workId":val}, {count:1});
};
var reduce = function(key, values) {
    var count = 0;
    values.forEach(function(v) {
        count += v['count'];
    });
    return {count: count};
}
db.name.mapReduce(map, reduce, {out: "grouped"})
db.grouped.find()

To get only those having count greather than 1, I do
db.grouped.aggregate([{$match:{"value.count":{$gt: 1}}}])

An example result is then following
{
    "_id" : {
        "institutionId" : "1004",
        "workId" : "591426"
    },
    "value" : {
        "count" : 2
    }
}

But I am curious whether if possible to have it done just by doing MapReduce as one statement. Sth like adding a finalizer or so.

A: If there is a single document havig a key it will never go inside reduce, is considered reduced already, that is the behaviour of the MongoDB map-reduce:

MongoDB will not call the reduce function for a key that has only a
single value.

Using finalzie also doesn't help much, i.e. if in finalize funtion you do a if count > 1 then return reducedVal else None, than you will have None (instead of 1) in the result.
I am afraid that using (one) map-reduce, documents having count 1 will be alwasy in the result, since they are fired up from map.
You can use 2 map reduce operations in a chain, in the second map you don't emit the documents having count < 2. But these does not think it's better than an extra query as it is in your example.

A: A much better, simpler and more efficient approach would be to use the aggregation framework where you can use operators like $arrayElemAt to return the first subdocument from the array and then using the $group pipeline to aggregate the counts. You can then place the $match pipeline to filter your results based on the given criteria.
The following example shows this faster approach:
db.name.aggregate([
    {
        "$project": {
            "key": "$institutionId",
            "val": {
                "$arrayElemAt": ["$currentObject.systemIdentifiers", 0]
            }
        }
    },
    {
        "$group": {
            "_id": {
                "institutionId": "$key",
                "workId": "$val.value"
            },
            "count": { "$sum": 1 }
        }
    },
    { "$match": { "count": { "$gt": 1 } } }
])


text:
Oct 17, 2017 | Alumni, Business, EdD, Education, MBA, News, Nursing, SOE Grad, SPGS
Convocation gift will help first-generation students
Baker University's 2017 convocation ceremony was held Oct. 17 in the newly renovated Rice Auditorium. The theme for the event, giving back, was inspired by keynote speaker Bob Carr, CEO and president of the Give Something Back Foundation.
During the ceremony, Carr presented a $1 million gift to Baker University, to be earmarked for scholarships specifically for first-generation college students. For every dollar raised by Baker University for this scholarship fund, Carr's foundation will match it two to one.
As Baker University President Lynne Murray thanked Carr for his outstanding gift, she remarked that as a first-generation college graduate, she recognizes the unmatched value of an education and knows that his graciousness and support will be carried on by the Baker family.
"Just as Carr has shown through his Give Something Back Foundation, I want us all here at Baker to continue to embrace this notion of helping one another and of assuring more students receive equal footing in life," Dr. Murray said. "We are so proud Baker has partnered with the Give Something Back Foundation as we continue to invest in and give back to our community."
Carr was the founder and former chief executive officer of Heartland Payment Systems, a Fortune 1000 debit- and credit-card transaction company acquired by Global Payments for over $4.3 billion. He's won praise for his technological prowess and ethical leadership from Businessweek and Jim Cramer, host of the television show Mad Money. Carr's company, Give Something Back, is a nonprofit charity that provides academic mentoring, social guidance, and college scholarships for students from lower-income families throughout the nation. Since its inception in 2003, it has contributed more than $25 million for mentoring and scholarships.
The public can view the Baker University 2017 convocation at this link: https://livestream.com/accounts/5725340/Convocation2017